Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3316)

Unified Diff: src/compilation-cache.cc

Issue 6286043: Direct call to eval passes strict mode through. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Extra argument to Resolve*Eval* Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/compilation-cache.cc
diff --git a/src/compilation-cache.cc b/src/compilation-cache.cc
index 38438cb9132ca6c21eed433b78c04af7c1e967c0..f3eea7fc37552af7c740169853b8b4f53f81ffd7 100644
--- a/src/compilation-cache.cc
+++ b/src/compilation-cache.cc
@@ -136,7 +136,8 @@ class CompilationCacheEval: public CompilationSubCache {
: CompilationSubCache(generations) { }
Handle<SharedFunctionInfo> Lookup(Handle<String> source,
- Handle<Context> context);
+ Handle<Context> context,
+ bool is_strict);
void Put(Handle<String> source,
Handle<Context> context,
@@ -371,7 +372,7 @@ void CompilationCacheScript::Put(Handle<String> source,
Handle<SharedFunctionInfo> CompilationCacheEval::Lookup(
- Handle<String> source, Handle<Context> context) {
+ Handle<String> source, Handle<Context> context, bool is_strict) {
// Make sure not to leak the table into the surrounding handle
// scope. Otherwise, we risk keeping old tables around even after
// having cleared the cache.
@@ -380,7 +381,7 @@ Handle<SharedFunctionInfo> CompilationCacheEval::Lookup(
{ HandleScope scope;
for (generation = 0; generation < generations(); generation++) {
Handle<CompilationCacheTable> table = GetTable(generation);
- result = table->LookupEval(*source, *context);
+ result = table->LookupEval(*source, *context, is_strict);
if (result->IsSharedFunctionInfo()) {
break;
}
@@ -505,16 +506,17 @@ Handle<SharedFunctionInfo> CompilationCache::LookupScript(Handle<String> source,
Handle<SharedFunctionInfo> CompilationCache::LookupEval(Handle<String> source,
Handle<Context> context,
- bool is_global) {
+ bool is_global,
+ bool is_strict) {
if (!IsEnabled()) {
return Handle<SharedFunctionInfo>::null();
}
Handle<SharedFunctionInfo> result;
if (is_global) {
- result = eval_global.Lookup(source, context);
+ result = eval_global.Lookup(source, context, is_strict);
} else {
- result = eval_contextual.Lookup(source, context);
+ result = eval_contextual.Lookup(source, context, is_strict);
}
return result;
}

Powered by Google App Engine
This is Rietveld 408576698