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

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

Issue 2613723002: [runtime] Use DCHECK_EQ instead of DCHECK for number of args. (Closed)
Patch Set: Rebase. Created 3 years, 11 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
« no previous file with comments | « src/runtime/runtime-promise.cc ('k') | src/runtime/runtime-regexp.cc » ('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/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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 isolate, 128 isolate,
129 NewTypeError(MessageTemplate::kProxyConstructNonObject, new_object)); 129 NewTypeError(MessageTemplate::kProxyConstructNonObject, new_object));
130 } 130 }
131 // 10. Return newObj. 131 // 10. Return newObj.
132 return *new_object; 132 return *new_object;
133 } 133 }
134 134
135 135
136 RUNTIME_FUNCTION(Runtime_IsJSProxy) { 136 RUNTIME_FUNCTION(Runtime_IsJSProxy) {
137 SealHandleScope shs(isolate); 137 SealHandleScope shs(isolate);
138 DCHECK(args.length() == 1); 138 DCHECK_EQ(1, args.length());
139 CONVERT_ARG_CHECKED(Object, obj, 0); 139 CONVERT_ARG_CHECKED(Object, obj, 0);
140 return isolate->heap()->ToBoolean(obj->IsJSProxy()); 140 return isolate->heap()->ToBoolean(obj->IsJSProxy());
141 } 141 }
142 142
143 143
144 RUNTIME_FUNCTION(Runtime_JSProxyGetHandler) { 144 RUNTIME_FUNCTION(Runtime_JSProxyGetHandler) {
145 SealHandleScope shs(isolate); 145 SealHandleScope shs(isolate);
146 DCHECK(args.length() == 1); 146 DCHECK_EQ(1, args.length());
147 CONVERT_ARG_CHECKED(JSProxy, proxy, 0); 147 CONVERT_ARG_CHECKED(JSProxy, proxy, 0);
148 return proxy->handler(); 148 return proxy->handler();
149 } 149 }
150 150
151 151
152 RUNTIME_FUNCTION(Runtime_JSProxyGetTarget) { 152 RUNTIME_FUNCTION(Runtime_JSProxyGetTarget) {
153 SealHandleScope shs(isolate); 153 SealHandleScope shs(isolate);
154 DCHECK(args.length() == 1); 154 DCHECK_EQ(1, args.length());
155 CONVERT_ARG_CHECKED(JSProxy, proxy, 0); 155 CONVERT_ARG_CHECKED(JSProxy, proxy, 0);
156 return proxy->target(); 156 return proxy->target();
157 } 157 }
158 158
159 159
160 RUNTIME_FUNCTION(Runtime_JSProxyRevoke) { 160 RUNTIME_FUNCTION(Runtime_JSProxyRevoke) {
161 HandleScope scope(isolate); 161 HandleScope scope(isolate);
162 DCHECK(args.length() == 1); 162 DCHECK_EQ(1, args.length());
163 CONVERT_ARG_HANDLE_CHECKED(JSProxy, proxy, 0); 163 CONVERT_ARG_HANDLE_CHECKED(JSProxy, proxy, 0);
164 JSProxy::Revoke(proxy); 164 JSProxy::Revoke(proxy);
165 return isolate->heap()->undefined_value(); 165 return isolate->heap()->undefined_value();
166 } 166 }
167 167
168 } // namespace internal 168 } // namespace internal
169 } // namespace v8 169 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-promise.cc ('k') | src/runtime/runtime-regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698