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

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

Issue 90243003: Use V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID() in V8Window::openMethodCustom() (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
« no previous file with comments | « Source/bindings/v8/V8Binding.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/custom/V8WindowCustom.cpp
diff --git a/Source/bindings/v8/custom/V8WindowCustom.cpp b/Source/bindings/v8/custom/V8WindowCustom.cpp
index dc92353915ffbb7f261b447b03933422e28f801a..1fd3cd60470f287242d4f4a35880c35a8b0a7c91 100644
--- a/Source/bindings/v8/custom/V8WindowCustom.cpp
+++ b/Source/bindings/v8/custom/V8WindowCustom.cpp
@@ -385,10 +385,15 @@ void V8Window::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
return;
}
- // FIXME: Handle exceptions properly.
- String urlString = toWebCoreStringWithUndefinedOrNullCheck(info[0]);
- AtomicString frameName = (info[1]->IsUndefined() || info[1]->IsNull()) ? "_blank" : toWebCoreAtomicString(info[1]);
- String windowFeaturesString = toWebCoreStringWithUndefinedOrNullCheck(info[2]);
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullCheck>, urlString, info[0]);
+ AtomicString frameName;
+ if (info[1]->IsUndefined() || info[1]->IsNull()) {
+ frameName = "_blank";
+ } else {
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, frameNameResource, info[1]);
+ frameName = frameNameResource;
+ }
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullCheck>, windowFeaturesString, info[2]);
RefPtr<DOMWindow> openedWindow = impl->open(urlString, frameName, windowFeaturesString, activeDOMWindow(), firstDOMWindow());
if (!openedWindow)
« no previous file with comments | « Source/bindings/v8/V8Binding.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698