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

Unified Diff: Source/bindings/v8/custom/V8WindowCustom.cpp

Issue 23526039: Replace several uses of toWebCoreString() by V8TRYCATCH_FOR_V8STRINGRESOURCE() macro (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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
Index: Source/bindings/v8/custom/V8WindowCustom.cpp
diff --git a/Source/bindings/v8/custom/V8WindowCustom.cpp b/Source/bindings/v8/custom/V8WindowCustom.cpp
index 697bc83832f19f415a6c088bb85d374936ece5ad..414364ed0bd7cee34ae0dad25a4ee30ce9adc25a 100644
--- a/Source/bindings/v8/custom/V8WindowCustom.cpp
+++ b/Source/bindings/v8/custom/V8WindowCustom.cpp
@@ -213,8 +213,10 @@ void V8Window::locationAttributeSetterCustom(v8::Local<v8::String> name, v8::Loc
if (!first)
return;
- if (Location* location = imp->location())
- location->setHref(active, first, toWebCoreString(value));
+ if (Location* location = imp->location()) {
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, href, value);
+ location->setHref(active, first, href);
+ }
}
void V8Window::openerAttributeSetterCustom(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
@@ -381,7 +383,7 @@ void V8Window::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
// FIXME: Handle exceptions properly.
String urlString = toWebCoreStringWithUndefinedOrNullCheck(args[0]);
- AtomicString frameName = (args[1]->IsUndefined() || args[1]->IsNull()) ? "_blank" : AtomicString(toWebCoreString(args[1]));
+ AtomicString frameName = (args[1]->IsUndefined() || args[1]->IsNull()) ? "_blank" : toWebCoreAtomicString(args[1]);
String windowFeaturesString = toWebCoreStringWithUndefinedOrNullCheck(args[2]);
RefPtr<DOMWindow> openedWindow = impl->open(urlString, frameName, windowFeaturesString, activeDOMWindow(), firstDOMWindow());

Powered by Google App Engine
This is Rietveld 408576698