summaryrefslogtreecommitdiff
path: root/deps/v8/src/accessors.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/accessors.cc')
-rw-r--r--deps/v8/src/accessors.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/deps/v8/src/accessors.cc b/deps/v8/src/accessors.cc
index ac6cdf95ac..82ae702fd9 100644
--- a/deps/v8/src/accessors.cc
+++ b/deps/v8/src/accessors.cc
@@ -511,7 +511,10 @@ Object* Accessors::FunctionGetArguments(Object* object, void*) {
// If there is an arguments variable in the stack, we return that.
int index = ScopeInfo<>::StackSlotIndex(frame->code(),
Heap::arguments_symbol());
- if (index >= 0) return frame->GetExpression(index);
+ if (index >= 0) {
+ Handle<Object> arguments = Handle<Object>(frame->GetExpression(index));
+ if (!arguments->IsTheHole()) return *arguments;
+ }
// If there isn't an arguments variable in the stack, we need to
// find the frame that holds the actual arguments passed to the