Exemplo n.º 1
0
 ~EvalScriptGuard() {
     if (script_) {
         script_->cacheForEval();
         EvalCacheEntry cacheEntry = {script_, lookup_.callerScript, lookup_.pc};
         lookup_.str = lookupStr_;
         if (lookup_.str && IsEvalCacheCandidate(script_))
             cx_->runtime()->evalCache.relookupOrAdd(p_, lookup_, cacheEntry);
     }
 }
Exemplo n.º 2
0
 ~EvalScriptGuard() {
     if (script_) {
         CallDestroyScriptHook(cx_->runtime()->defaultFreeOp(), script_);
         script_->cacheForEval();
         EvalCacheEntry cacheEntry = {script_, lookup_.callerScript, lookup_.pc};
         lookup_.str = lookupStr_;
         if (lookup_.str && IsEvalCacheCandidate(script_))
             cx_->runtime()->evalCache.relookupOrAdd(p_, lookup_, cacheEntry);
     }
 }
Exemplo n.º 3
0
 ~EvalScriptGuard() {
     if (script_) {
         script_->cacheForEval();
         EvalCacheEntry cacheEntry = {lookupStr_, script_, lookup_.callerScript, lookup_.pc};
         lookup_.str = lookupStr_;
         if (lookup_.str && IsEvalCacheCandidate(script_)) {
             bool ok = cx_->runtime()->evalCache.relookupOrAdd(p_, lookup_, cacheEntry);
             (void)ok; // Ignore failure to add cache entry.
         }
     }
 }