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

Unified Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp

Issue 1387743002: Fixed expando-loss.html test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cache ScriptState and use it to wrap m_defaultVertexArrayObject. Created 5 years, 2 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: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
index d0b1507be5a13a82865857ab3516b60d57bd2885..c365bd5508fbca82a6edc34362d6df51211d9d96 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
@@ -224,14 +224,14 @@ void HTMLCanvasElement::registerRenderingContextFactory(PassOwnPtr<CanvasRenderi
ScriptValue HTMLCanvasElement::getContext(ScriptState* scriptState, const String& type, const CanvasContextCreationAttributes& attributes)
{
- CanvasRenderingContext* context = getCanvasRenderingContext(type, attributes);
+ CanvasRenderingContext* context = getCanvasRenderingContext(scriptState, type, attributes);
if (!context) {
return ScriptValue::createNull(scriptState);
}
return ScriptValue(scriptState, toV8(context, scriptState->context()->Global(), scriptState->isolate()));
}
-CanvasRenderingContext* HTMLCanvasElement::getCanvasRenderingContext(const String& type, const CanvasContextCreationAttributes& attributes)
+CanvasRenderingContext* HTMLCanvasElement::getCanvasRenderingContext(ScriptState* scriptState, const String& type, const CanvasContextCreationAttributes& attributes)
{
CanvasRenderingContext::ContextType contextType = CanvasRenderingContext::contextTypeFromId(type);
@@ -260,7 +260,7 @@ CanvasRenderingContext* HTMLCanvasElement::getCanvasRenderingContext(const Strin
return nullptr;
}
- m_context = factory->create(this, attributes, document());
+ m_context = factory->create(this, scriptState, attributes, document());
if (!m_context)
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698