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

Unified 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, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-test.cc
diff --git a/src/runtime/runtime-test.cc b/src/runtime/runtime-test.cc
index 2c38f12eb77c47f8606d9354d67d575f498d4e51..59b695c6f7803d74e0dd4b508d8d0aae2598ff13 100644
--- a/src/runtime/runtime-test.cc
+++ b/src/runtime/runtime-test.cc
@@ -216,11 +216,14 @@ RUNTIME_FUNCTION(Runtime_GetOptimizationCount) {
RUNTIME_FUNCTION(Runtime_GetUndetectable) {
HandleScope scope(isolate);
DCHECK(args.length() == 0);
+ v8::Isolate* v8_isolate = reinterpret_cast<v8::Isolate*>(isolate);
- Local<v8::ObjectTemplate> desc =
- v8::ObjectTemplate::New((v8::Isolate*)isolate);
- desc->MarkAsUndetectable(); // undetectable
- Local<v8::Object> obj = desc->NewInstance();
+ Local<v8::ObjectTemplate> desc = v8::ObjectTemplate::New(v8_isolate);
+ desc->MarkAsUndetectable();
+ Local<v8::Object> obj;
+ if (!desc->NewInstance(v8_isolate->GetCurrentContext()).ToLocal(&obj)) {
+ return nullptr;
+ }
return *Utils::OpenHandle(*obj);
}
« 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