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

Unified Diff: Source/bindings/tests/results/V8TestEventTarget.cpp

Issue 94833002: Remove usage of deprecated V8 APIs from bindings code generator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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
Index: Source/bindings/tests/results/V8TestEventTarget.cpp
diff --git a/Source/bindings/tests/results/V8TestEventTarget.cpp b/Source/bindings/tests/results/V8TestEventTarget.cpp
index e351db0239e377ccd696f8d634e9d573c0b5c0c7..4bcd6447fa424b8ce548a792c3c41dc707f251aa 100644
--- a/Source/bindings/tests/results/V8TestEventTarget.cpp
+++ b/Source/bindings/tests/results/V8TestEventTarget.cpp
@@ -240,9 +240,9 @@ static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i
collection->namedPropertyEnumerator(names, exceptionState);
if (exceptionState.throwIfNeeded())
return;
- v8::Handle<v8::Array> v8names = v8::Array::New(names.size());
+ v8::Handle<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size());
for (size_t i = 0; i < names.size(); ++i)
- v8names->Set(v8::Integer::New(i, info.GetIsolate()), v8String(names[i], info.GetIsolate()));
+ v8names->Set(v8::Integer::New(info.GetIsolate(), i), v8String(names[i], info.GetIsolate()));
v8SetReturnValue(info, v8names);
}
@@ -300,7 +300,7 @@ static v8::Handle<v8::FunctionTemplate> ConfigureV8TestEventTargetTemplate(v8::H
functionTemplate->InstanceTemplate()->MarkAsUndetectable();
// Custom toString template
- functionTemplate->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
+ functionTemplate->Set(v8::String::NewFromUtf8(isolate, "toString", v8::String::kInternalizedString), V8PerIsolateData::current()->toStringTemplate());
return functionTemplate;
}
@@ -312,11 +312,11 @@ v8::Handle<v8::FunctionTemplate> V8TestEventTarget::GetTemplate(v8::Isolate* iso
return result->value.newLocal(isolate);
TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate");
- v8::HandleScope handleScope(isolate);
- v8::Handle<v8::FunctionTemplate> templ =
+ v8::EscapableHandleScope handleScope(isolate);
+ v8::Local<v8::FunctionTemplate> templ =
ConfigureV8TestEventTargetTemplate(data->rawTemplate(&wrapperTypeInfo, currentWorldType), isolate, currentWorldType);
data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v8::FunctionTemplate>(isolate, templ));
- return handleScope.Close(templ);
+ return handleScope.Escape(templ);
}
bool V8TestEventTarget::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate, WrapperWorldType currentWorldType)
« no previous file with comments | « Source/bindings/tests/results/V8TestEventConstructor.cpp ('k') | Source/bindings/tests/results/V8TestException.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698