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

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

Issue 1530293004: [proxies] Better print for proxies in d8 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: do not expose intrinsics directly Created 4 years, 12 months 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
« src/d8.js ('K') | « src/runtime/runtime.h ('k') | no next file » | 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/elements.h" 8 #include "src/elements.h"
9 #include "src/factory.h" 9 #include "src/factory.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 143
144 RUNTIME_FUNCTION(Runtime_IsJSProxy) { 144 RUNTIME_FUNCTION(Runtime_IsJSProxy) {
145 SealHandleScope shs(isolate); 145 SealHandleScope shs(isolate);
146 DCHECK(args.length() == 1); 146 DCHECK(args.length() == 1);
147 CONVERT_ARG_CHECKED(Object, obj, 0); 147 CONVERT_ARG_CHECKED(Object, obj, 0);
148 return isolate->heap()->ToBoolean(obj->IsJSProxy()); 148 return isolate->heap()->ToBoolean(obj->IsJSProxy());
149 } 149 }
150 150
151 151
152 RUNTIME_FUNCTION(Runtime_GetHandler) { 152 RUNTIME_FUNCTION(Runtime_JSProxyGetHandler) {
153 SealHandleScope shs(isolate); 153 SealHandleScope shs(isolate);
154 DCHECK(args.length() == 1); 154 DCHECK(args.length() == 1);
155 CONVERT_ARG_CHECKED(JSProxy, proxy, 0); 155 CONVERT_ARG_CHECKED(JSProxy, proxy, 0);
156 return proxy->handler(); 156 return proxy->handler();
157 } 157 }
158 158
159 159
160 RUNTIME_FUNCTION(Runtime_RevokeProxy) { 160 RUNTIME_FUNCTION(Runtime_JSProxyGetTarget) {
161 SealHandleScope shs(isolate);
162 DCHECK(args.length() == 1);
163 CONVERT_ARG_CHECKED(JSProxy, proxy, 0);
164 return proxy->target();
165 }
166
167
168 RUNTIME_FUNCTION(Runtime_JSProxyRevoke) {
161 HandleScope scope(isolate); 169 HandleScope scope(isolate);
162 DCHECK(args.length() == 1); 170 DCHECK(args.length() == 1);
163 CONVERT_ARG_HANDLE_CHECKED(JSProxy, proxy, 0); 171 CONVERT_ARG_HANDLE_CHECKED(JSProxy, proxy, 0);
164 JSProxy::Revoke(proxy); 172 JSProxy::Revoke(proxy);
165 return isolate->heap()->undefined_value(); 173 return isolate->heap()->undefined_value();
166 } 174 }
167 175
168 } // namespace internal 176 } // namespace internal
169 } // namespace v8 177 } // namespace v8
OLDNEW
« src/d8.js ('K') | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698