summaryrefslogtreecommitdiffstats
path: root/src/accessors.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/accessors.cc')
-rw-r--r--src/accessors.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/accessors.cc b/src/accessors.cc
index e7d6aa0e..951209d9 100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -599,6 +599,7 @@ MaybeObject* Accessors::FunctionGetArguments(Object* object, void*) {
if (!found_it) return isolate->heap()->undefined_value();
Handle<JSFunction> function(holder, isolate);
+ if (function->shared()->native()) return isolate->heap()->null_value();
// Find the top invocation of the function by traversing frames.
List<JSFunction*> functions(2);
for (JavaScriptFrameIterator it(isolate); !it.done(); it.Advance()) {
@@ -709,6 +710,7 @@ class FrameFunctionIterator {
} while (next_function != NULL);
return false;
}
+
private:
void GetFunctions() {
functions_.Rewind(0);
@@ -732,6 +734,7 @@ MaybeObject* Accessors::FunctionGetCaller(Object* object, void*) {
bool found_it = false;
JSFunction* holder = FindInPrototypeChain<JSFunction>(object, &found_it);
if (!found_it) return isolate->heap()->undefined_value();
+ if (holder->shared()->native()) return isolate->heap()->null_value();
Handle<JSFunction> function(holder, isolate);
FrameFunctionIterator it(isolate, no_alloc);