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

Unified Diff: Source/bindings/core/v8/custom/V8HTMLCanvasElementCustom.cpp

Issue 365653002: Oilpan: move 2D Canvas and WebGL objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Smaller adjustments Created 6 years, 5 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/core/v8/custom/V8HTMLCanvasElementCustom.cpp
diff --git a/Source/bindings/core/v8/custom/V8HTMLCanvasElementCustom.cpp b/Source/bindings/core/v8/custom/V8HTMLCanvasElementCustom.cpp
index 6710887dfb97b3934a4dae603d9c791cbf64bd91..2c75a5db6ac22647d50f1dbecd8861f438192c9f 100644
--- a/Source/bindings/core/v8/custom/V8HTMLCanvasElementCustom.cpp
+++ b/Source/bindings/core/v8/custom/V8HTMLCanvasElementCustom.cpp
@@ -54,9 +54,9 @@ void V8HTMLCanvasElement::getContextMethodCustom(const v8::FunctionCallbackInfo<
HTMLCanvasElement* impl = V8HTMLCanvasElement::toNative(holder);
TOSTRING_VOID(V8StringResource<>, contextIdResource, info[0]);
String contextId = contextIdResource;
- RefPtr<CanvasContextAttributes> attributes;
+ RefPtrWillBeRawPtr<CanvasContextAttributes> attributes = nullptr;
if (contextId == "webgl" || contextId == "experimental-webgl") {
- RefPtr<WebGLContextAttributes> webGLAttributes = WebGLContextAttributes::create();
+ RefPtrWillBeRawPtr<WebGLContextAttributes> webGLAttributes = WebGLContextAttributes::create();
if (info.Length() > 1 && info[1]->IsObject()) {
v8::Handle<v8::Object> jsAttributes = info[1]->ToObject();
v8::Handle<v8::String> alpha = v8AtomicString(isolate, "alpha");
@@ -83,7 +83,7 @@ void V8HTMLCanvasElement::getContextMethodCustom(const v8::FunctionCallbackInfo<
}
attributes = webGLAttributes;
} else {
- RefPtr<Canvas2DContextAttributes> canvas2DAttributes = Canvas2DContextAttributes::create();
+ RefPtrWillBeRawPtr<Canvas2DContextAttributes> canvas2DAttributes = Canvas2DContextAttributes::create();
if (info.Length() > 1 && info[1]->IsObject()) {
v8::Handle<v8::Object> jsAttributes = info[1]->ToObject();
v8::Handle<v8::String> alpha = v8AtomicString(isolate, "alpha");

Powered by Google App Engine
This is Rietveld 408576698