diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-06-02 10:43:26 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-06-02 10:44:03 +0200 |
commit | bb91a70e24ac49fd21c1d7c8c91a216961da1e2d (patch) | |
tree | 4c2497e0b093c7b0a25d48e72659dca21a50569a /chromium/v8/src/runtime/runtime-function.cc | |
parent | 1ec92e71bb67445775ce64cb081ed25c3d7481f1 (diff) | |
parent | b92421879c003a0857b2074f7e05b3bbbb326569 (diff) | |
download | qtwebengine-chromium-bb91a70e24ac49fd21c1d7c8c91a216961da1e2d.tar.gz |
Merge branch 'upstream-master' into 51-based
Change-Id: I08d36e04494c3bb0c04641ad7c8e53bf418975db
Diffstat (limited to 'chromium/v8/src/runtime/runtime-function.cc')
-rw-r--r-- | chromium/v8/src/runtime/runtime-function.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/chromium/v8/src/runtime/runtime-function.cc b/chromium/v8/src/runtime/runtime-function.cc index 939bd53e6a8..011f9ff820a 100644 --- a/chromium/v8/src/runtime/runtime-function.cc +++ b/chromium/v8/src/runtime/runtime-function.cc @@ -16,11 +16,20 @@ namespace v8 { namespace internal { RUNTIME_FUNCTION(Runtime_FunctionGetName) { - SealHandleScope shs(isolate); + HandleScope scope(isolate); DCHECK(args.length() == 1); - CONVERT_ARG_CHECKED(JSFunction, f, 0); - return f->shared()->name(); + CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); + if (function->IsJSBoundFunction()) { + Handle<Object> result; + ASSIGN_RETURN_FAILURE_ON_EXCEPTION( + isolate, result, JSBoundFunction::GetName( + isolate, Handle<JSBoundFunction>::cast(function))); + return *result; + } else { + RUNTIME_ASSERT(function->IsJSFunction()); + return Handle<JSFunction>::cast(function)->shared()->name(); + } } |