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

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: Have Nullable<T>::trace() use TraceIfNeeded<>. 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 e8d4fbb4bafe1b688d648ebdf2d5ac8188f68cb7..96f0d1198f6fdc87b046adf11b8dbb4c3132c3eb 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