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

Side by Side Diff: src/runtime/runtime-proxy.cc

Issue 1496243003: [proxies] Implement Proxy.revocable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments. 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/runtime/runtime.h ('k') | test/mjsunit/harmony/proxies-revocable.js » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/factory.h" 8 #include "src/factory.h"
9 #include "src/objects-inl.h" 9 #include "src/objects-inl.h"
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 59
60 60
61 RUNTIME_FUNCTION(Runtime_GetConstructTrap) { 61 RUNTIME_FUNCTION(Runtime_GetConstructTrap) {
62 SealHandleScope shs(isolate); 62 SealHandleScope shs(isolate);
63 DCHECK(args.length() == 1); 63 DCHECK(args.length() == 1);
64 CONVERT_ARG_CHECKED(JSFunctionProxy, proxy, 0); 64 CONVERT_ARG_CHECKED(JSFunctionProxy, proxy, 0);
65 return proxy->construct_trap(); 65 return proxy->construct_trap();
66 } 66 }
67 67
68
69 RUNTIME_FUNCTION(Runtime_RevokeProxy) {
70 HandleScope scope(isolate);
71 DCHECK(args.length() == 1);
72 CONVERT_ARG_HANDLE_CHECKED(JSProxy, proxy, 0);
73 JSProxy::Revoke(proxy);
74 return isolate->heap()->undefined_value();
75 }
76
77
68 } // namespace internal 78 } // namespace internal
69 } // namespace v8 79 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/harmony/proxies-revocable.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698