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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp

Issue 2565983002: Implicit prefinalizer registration. (Closed)
Patch Set: recast registration class Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/BlinkGCAPIReference.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 } 139 }
140 140
141 DEFINE_NODE_FACTORY(HTMLCanvasElement) 141 DEFINE_NODE_FACTORY(HTMLCanvasElement)
142 142
143 HTMLCanvasElement::~HTMLCanvasElement() { 143 HTMLCanvasElement::~HTMLCanvasElement() {
144 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory( 144 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(
145 -m_externallyAllocatedMemory); 145 -m_externallyAllocatedMemory);
146 } 146 }
147 147
148 void HTMLCanvasElement::dispose() { 148 void HTMLCanvasElement::dispose() {
149 releasePlaceholderFrame(); 149 if (placeholderFrame())
150 releasePlaceholderFrame();
150 151
151 if (m_context) { 152 if (m_context) {
152 m_context->detachCanvas(); 153 m_context->detachCanvas();
153 m_context = nullptr; 154 m_context = nullptr;
154 } 155 }
155 156
156 if (m_imageBuffer) { 157 if (m_imageBuffer) {
157 m_imageBuffer->setClient(nullptr); 158 m_imageBuffer->setClient(nullptr);
158 m_imageBuffer = nullptr; 159 m_imageBuffer = nullptr;
159 } 160 }
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 mojom::blink::OffscreenCanvasSurfacePtr service; 1399 mojom::blink::OffscreenCanvasSurfacePtr service;
1399 Platform::current()->interfaceProvider()->getInterface( 1400 Platform::current()->interfaceProvider()->getInterface(
1400 mojo::GetProxy(&service)); 1401 mojo::GetProxy(&service));
1401 m_surfaceLayerBridge = 1402 m_surfaceLayerBridge =
1402 WTF::wrapUnique(new CanvasSurfaceLayerBridge(std::move(service))); 1403 WTF::wrapUnique(new CanvasSurfaceLayerBridge(std::move(service)));
1403 return m_surfaceLayerBridge->createSurfaceLayer(this->width(), 1404 return m_surfaceLayerBridge->createSurfaceLayer(this->width(),
1404 this->height()); 1405 this->height());
1405 } 1406 }
1406 1407
1407 } // namespace blink 1408 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/BlinkGCAPIReference.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698