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

Unified Diff: Source/bindings/v8/custom/V8HTMLCanvasElementCustom.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/V8HTMLCanvasElementCustom.cpp
diff --git a/Source/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp b/Source/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp
index 56f9f916b96c4083346f1ed20e9ad5c7e7cee3a9..eb863d76fb16fc310f59f302f4147b4f3bb18380 100644
--- a/Source/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp
+++ b/Source/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp
@@ -51,7 +51,8 @@ void V8HTMLCanvasElement::getContextMethodCustom(const v8::FunctionCallbackInfo<
{
v8::Handle<v8::Object> holder = args.Holder();
HTMLCanvasElement* imp = V8HTMLCanvasElement::toNative(holder);
- String contextId = toWebCoreString(args[0]);
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, contextIdResource, args[0]);
+ String contextId = contextIdResource;
RefPtr<CanvasContextAttributes> attributes;
if (contextId == "webgl" || contextId == "experimental-webgl" || contextId == "webkit-3d") {
RefPtr<WebGLContextAttributes> webGLAttributes = WebGLContextAttributes::create();
@@ -130,7 +131,7 @@ void V8HTMLCanvasElement::toDataURLMethodCustom(const v8::FunctionCallbackInfo<v
HTMLCanvasElement* canvas = V8HTMLCanvasElement::toNative(holder);
ExceptionState es(args.GetIsolate());
- String type = toWebCoreString(args[0]);
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, type, args[0]);
double quality;
double* qualityPtr = 0;
if (args.Length() > 1 && args[1]->IsNumber()) {

Powered by Google App Engine
This is Rietveld 408576698