Ignore:
Timestamp:
May 7, 2019, 2:17:08 PM (5 years ago)
Author:
djay
Message:

Merge prototype-v0 branch in trunk

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/zoo-project/zoo-kernel/service_internal_js.c

    r828 r917  
    157157    return 1;
    158158  if (!JS_DefineFunction(cx, global, "alert", JSAlert, 2, 0))
     159    return 1; 
     160  if (!JS_DefineFunction(cx, global, "sleep", JSSleep, 1, 0))
    159161    return 1; 
    160162  if (!JS_DefineFunction(cx, global, "importScripts", JSLoadScripts, 1, 0))
     
    901903  char* tmpValue;
    902904  size_t dwRead;
     905  maps *tmpConf=createMaps("main");
     906  tmpConf->content=createMap("memory","load");
    903907  JS_MaybeGC(cx);
    904908  hInternet=InternetOpen("ZooWPSClient\0",
     
    929933#endif
    930934    InternetOpenUrl(&hInternet,hInternet.waitingRequests[hInternet.nb],body,strlen(body),
    931                     INTERNET_FLAG_NO_CACHE_WRITE,0);   
     935                    INTERNET_FLAG_NO_CACHE_WRITE,0,tmpConf);   
    932936    processDownloads(&hInternet);
    933937    free(body);
     
    940944        }
    941945        InternetOpenUrl(&hInternet,hInternet.waitingRequests[hInternet.nb],NULL,0,
    942                         INTERNET_FLAG_NO_CACHE_WRITE,0);
     946                        INTERNET_FLAG_NO_CACHE_WRITE,0,tmpConf);
    943947        processDownloads(&hInternet);
    944948      }else{
    945949        char *body=JSValToChar(cx,&argv[2]);
    946950        InternetOpenUrl(&hInternet,hInternet.waitingRequests[hInternet.nb],body,strlen(body),
    947                         INTERNET_FLAG_NO_CACHE_WRITE,0);
     951                        INTERNET_FLAG_NO_CACHE_WRITE,0,tmpConf);
    948952        processDownloads(&hInternet);
    949953        free(body);
     
    951955    }else{
    952956      InternetOpenUrl(&hInternet,hInternet.waitingRequests[hInternet.nb],NULL,0,
    953                       INTERNET_FLAG_NO_CACHE_WRITE,0);
     957                      INTERNET_FLAG_NO_CACHE_WRITE,0,tmpConf);
    954958      processDownloads(&hInternet);
    955959    }
     
    972976  if(argc>=2)
    973977    free(method);
     978  freeMaps(&tmpConf);
     979  free(tmpConf);
    974980  InternetCloseHandle(&hInternet);
    975981  JS_MaybeGC(cx);
     
    10231029}
    10241030
     1031/**
     1032 * The function used as sleep from the JavaScript environment
     1033 * (ZOO-API).
     1034 *
     1035 * @param cx the JavaScript context
     1036 * @param argc the number of parameters
     1037 * @param argv1 the parameter values
     1038 * @return true
     1039 */
     1040JSBool
     1041JSSleep(JSContext *cx, uintN argc, jsval *argv1)
     1042{
     1043  jsval *argv = JS_ARGV(cx,argv1);
     1044  JS_MaybeGC(cx);
     1045  int isleep=0;
     1046  if(JS_ValueToInt32(cx,argv[0],&isleep)==JS_TRUE){
     1047    zSleep(isleep);
     1048  }
     1049  JS_MaybeGC(cx);
     1050  return JS_TRUE;
     1051}
     1052
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png