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

Unified Diff: Source/bindings/v8/custom/V8XSLTProcessorCustom.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/V8XSLTProcessorCustom.cpp
diff --git a/Source/bindings/v8/custom/V8XSLTProcessorCustom.cpp b/Source/bindings/v8/custom/V8XSLTProcessorCustom.cpp
index 46b40ffa7a930aaa5400ef500eb621519bd2c017..bd21dfe08de922eee3975c4975f6390df66411f8 100644
--- a/Source/bindings/v8/custom/V8XSLTProcessorCustom.cpp
+++ b/Source/bindings/v8/custom/V8XSLTProcessorCustom.cpp
@@ -51,11 +51,11 @@ void V8XSLTProcessor::setParameterMethodCustom(const v8::FunctionCallbackInfo<v8
if (isUndefinedOrNull(args[1]) || isUndefinedOrNull(args[2]))
return;
- XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, namespaceURI, args[0]);
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, localName, args[1]);
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, value, args[2]);
- String namespaceURI = toWebCoreString(args[0]);
- String localName = toWebCoreString(args[1]);
- String value = toWebCoreString(args[2]);
+ XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());
imp->setParameter(namespaceURI, localName, value);
}
@@ -64,10 +64,10 @@ void V8XSLTProcessor::getParameterMethodCustom(const v8::FunctionCallbackInfo<v8
if (isUndefinedOrNull(args[1]))
return;
- XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, namespaceURI, args[0]);
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, localName, args[1]);
- String namespaceURI = toWebCoreString(args[0]);
- String localName = toWebCoreString(args[1]);
+ XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());
String result = imp->getParameter(namespaceURI, localName);
if (result.isNull())
return;
@@ -80,10 +80,10 @@ void V8XSLTProcessor::removeParameterMethodCustom(const v8::FunctionCallbackInfo
if (isUndefinedOrNull(args[1]))
return;
- XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, namespaceURI, args[0]);
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, localName, args[1]);
- String namespaceURI = toWebCoreString(args[0]);
- String localName = toWebCoreString(args[1]);
+ XSLTProcessor* imp = V8XSLTProcessor::toNative(args.Holder());
imp->removeParameter(namespaceURI, localName);
}

Powered by Google App Engine
This is Rietveld 408576698