| OLD | NEW |
| 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 Loading... |
| 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_JSProxyGetHandler) { | 152 RUNTIME_FUNCTION(Runtime_GetHandler) { |
| 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_JSProxyGetTarget) { | 160 RUNTIME_FUNCTION(Runtime_RevokeProxy) { |
| 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) { | |
| 169 HandleScope scope(isolate); | 161 HandleScope scope(isolate); |
| 170 DCHECK(args.length() == 1); | 162 DCHECK(args.length() == 1); |
| 171 CONVERT_ARG_HANDLE_CHECKED(JSProxy, proxy, 0); | 163 CONVERT_ARG_HANDLE_CHECKED(JSProxy, proxy, 0); |
| 172 JSProxy::Revoke(proxy); | 164 JSProxy::Revoke(proxy); |
| 173 return isolate->heap()->undefined_value(); | 165 return isolate->heap()->undefined_value(); |
| 174 } | 166 } |
| 175 | 167 |
| 176 } // namespace internal | 168 } // namespace internal |
| 177 } // namespace v8 | 169 } // namespace v8 |
| OLD | NEW |