Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index c7aa5e0c5c1e7c5d87d9f3f9d282f876876a6057..9ef347c2e0c7e83393499f76b77ea5deb524868a 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -4372,7 +4372,15 @@ static MaybeObject* Runtime_GetArgumentsProperty(Arguments args) { |
// Handle special arguments properties. |
if (key->Equals(Heap::length_symbol())) return Smi::FromInt(n); |
- if (key->Equals(Heap::callee_symbol())) return frame->function(); |
+ if (key->Equals(Heap::callee_symbol())) { |
+ Object* function = frame->function(); |
+ if (function->IsJSFunction() && |
+ JSFunction::cast(function)->shared()->strict_mode()) { |
+ return Top::Throw(*Factory::NewTypeError("strict_arguments_callee", |
+ HandleVector<Object>(NULL, 0))); |
+ } |
+ return function; |
+ } |
// Lookup in the initial Object.prototype object. |
return Top::initial_object_prototype()->GetProperty(*key); |