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

Unified Diff: src/runtime.cc

Issue 6711027: [Isolates] Merge 7201:7258 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: Created 9 years, 9 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/runtime.cc
===================================================================
--- src/runtime.cc (revision 7254)
+++ src/runtime.cc (working copy)
@@ -4584,7 +4584,15 @@
// Handle special arguments properties.
if (key->Equals(isolate->heap()->length_symbol())) return Smi::FromInt(n);
- if (key->Equals(isolate->heap()->callee_symbol())) return frame->function();
+ if (key->Equals(isolate->heap()->callee_symbol())) {
+ Object* function = frame->function();
+ if (function->IsJSFunction() &&
+ JSFunction::cast(function)->shared()->strict_mode()) {
+ return isolate->Throw(*isolate->factory()->NewTypeError(
+ "strict_arguments_callee", HandleVector<Object>(NULL, 0)));
+ }
+ return function;
+ }
// Lookup in the initial Object.prototype object.
return isolate->initial_object_prototype()->GetProperty(*key);
@@ -8409,11 +8417,14 @@
HandleScope scope(isolate);
ASSERT(args.length() == 1);
CONVERT_ARG_CHECKED(JSFunction, func, 0);
- ASSERT(func->map()->instance_type() ==
- isolate->function_instance_map()->instance_type());
- ASSERT(func->map()->instance_size() ==
- isolate->function_instance_map()->instance_size());
- func->set_map(*isolate->function_instance_map());
+
+ Handle<Map> map = func->shared()->strict_mode()
+ ? isolate->strict_mode_function_instance_map()
+ : isolate->function_instance_map();
+
+ ASSERT(func->map()->instance_type() == map->instance_type());
+ ASSERT(func->map()->instance_size() == map->instance_size());
+ func->set_map(*map);
return *func;
}
« src/global-handles.cc ('K') | « src/platform-posix.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698