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

Side by Side Diff: src/builtins.cc

Issue 1499593003: [runtime] [proxy] Implementing [[Call]] (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updating comment Created 5 years 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 unified diff | Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | src/contexts.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/builtins.h" 5 #include "src/builtins.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 1781 matching lines...) Expand 10 before | Expand all | Expand 10 after
1792 THROW_NEW_ERROR_RETURN_FAILURE( 1792 THROW_NEW_ERROR_RETURN_FAILURE(
1793 isolate, 1793 isolate,
1794 NewTypeError(MessageTemplate::kConstructorNotFunction, 1794 NewTypeError(MessageTemplate::kConstructorNotFunction,
1795 isolate->factory()->NewStringFromAsciiChecked("Proxy"))); 1795 isolate->factory()->NewStringFromAsciiChecked("Proxy")));
1796 } 1796 }
1797 1797
1798 1798
1799 // ES6 section 26.2.1.1 Proxy ( target, handler ) for the [[Construct]] case. 1799 // ES6 section 26.2.1.1 Proxy ( target, handler ) for the [[Construct]] case.
1800 BUILTIN(ProxyConstructor_ConstructStub) { 1800 BUILTIN(ProxyConstructor_ConstructStub) {
1801 HandleScope scope(isolate); 1801 HandleScope scope(isolate);
1802 DCHECK(isolate->proxy_function()->IsConstructor());
1802 DCHECK_EQ(3, args.length()); 1803 DCHECK_EQ(3, args.length());
1803 Handle<Object> target = args.at<Object>(1); 1804 Handle<Object> target = args.at<Object>(1);
1804 Handle<Object> handler = args.at<Object>(2); 1805 Handle<Object> handler = args.at<Object>(2);
1805 // The ConstructStub is executed in the context of the caller, so we need 1806 // The ConstructStub is executed in the context of the caller, so we need
1806 // to enter the callee context first before raising an exception. 1807 // to enter the callee context first before raising an exception.
1807 isolate->set_context(args.target()->context()); 1808 isolate->set_context(args.target()->context());
1808 Handle<JSProxy> result; 1809 Handle<JSProxy> result;
1809 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, 1810 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
1810 ProxyCreate(isolate, target, handler)); 1811 ProxyCreate(isolate, target, handler));
1811 return *result; 1812 return *result;
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
2437 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) 2438 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C)
2438 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) 2439 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A)
2439 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) 2440 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H)
2440 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 2441 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
2441 #undef DEFINE_BUILTIN_ACCESSOR_C 2442 #undef DEFINE_BUILTIN_ACCESSOR_C
2442 #undef DEFINE_BUILTIN_ACCESSOR_A 2443 #undef DEFINE_BUILTIN_ACCESSOR_A
2443 2444
2444 2445
2445 } // namespace internal 2446 } // namespace internal
2446 } // namespace v8 2447 } // namespace v8
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698