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

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

Issue 1162363005: Remove usage of to-be-deprecated APIs from v8 core (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 6 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/objects.cc ('k') | tools/gyp/v8.gyp » ('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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/deoptimizer.h" 8 #include "src/deoptimizer.h"
9 #include "src/full-codegen.h" 9 #include "src/full-codegen.h"
10 #include "src/runtime/runtime-utils.h" 10 #include "src/runtime/runtime-utils.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 HandleScope scope(isolate); 209 HandleScope scope(isolate);
210 DCHECK(args.length() == 1); 210 DCHECK(args.length() == 1);
211 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); 211 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
212 return Smi::FromInt(function->shared()->opt_count()); 212 return Smi::FromInt(function->shared()->opt_count());
213 } 213 }
214 214
215 215
216 RUNTIME_FUNCTION(Runtime_GetUndetectable) { 216 RUNTIME_FUNCTION(Runtime_GetUndetectable) {
217 HandleScope scope(isolate); 217 HandleScope scope(isolate);
218 DCHECK(args.length() == 0); 218 DCHECK(args.length() == 0);
219 v8::Isolate* v8_isolate = reinterpret_cast<v8::Isolate*>(isolate);
219 220
220 Local<v8::ObjectTemplate> desc = 221 Local<v8::ObjectTemplate> desc = v8::ObjectTemplate::New(v8_isolate);
221 v8::ObjectTemplate::New((v8::Isolate*)isolate); 222 desc->MarkAsUndetectable();
222 desc->MarkAsUndetectable(); // undetectable 223 Local<v8::Object> obj;
223 Local<v8::Object> obj = desc->NewInstance(); 224 if (!desc->NewInstance(v8_isolate->GetCurrentContext()).ToLocal(&obj)) {
225 return nullptr;
226 }
224 return *Utils::OpenHandle(*obj); 227 return *Utils::OpenHandle(*obj);
225 } 228 }
226 229
227 230
228 RUNTIME_FUNCTION(Runtime_ClearFunctionTypeFeedback) { 231 RUNTIME_FUNCTION(Runtime_ClearFunctionTypeFeedback) {
229 HandleScope scope(isolate); 232 HandleScope scope(isolate);
230 DCHECK(args.length() == 1); 233 DCHECK(args.length() == 1);
231 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); 234 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
232 function->shared()->ClearTypeFeedbackInfo(); 235 function->shared()->ClearTypeFeedbackInfo();
233 Code* unoptimized = function->shared()->code(); 236 Code* unoptimized = function->shared()->code();
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ 501 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \
499 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ 502 CONVERT_ARG_CHECKED(JSObject, obj, 0); \
500 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ 503 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \
501 } 504 }
502 505
503 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) 506 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION)
504 507
505 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION 508 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION
506 } // namespace internal 509 } // namespace internal
507 } // namespace v8 510 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698