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

Unified Diff: Source/bindings/dart/custom/DartCanvasRenderingContext2DCustom.cpp

Issue 26789007: Add a native subtype of function that uses the native C++ class hierarchy to check if an element (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit/
Patch Set: Created 7 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: Source/bindings/dart/custom/DartCanvasRenderingContext2DCustom.cpp
===================================================================
--- Source/bindings/dart/custom/DartCanvasRenderingContext2DCustom.cpp (revision 1437)
+++ Source/bindings/dart/custom/DartCanvasRenderingContext2DCustom.cpp (working copy)
@@ -70,11 +70,10 @@
static PassRefPtr<CanvasStyle> toCanvasStyle(Dart_Handle value)
{
Dart_Handle exception = 0;
- DartDOMData* domData = DartDOMData::current();
- if (DartDOMWrapper::instanceOf<DartCanvasGradient>(domData, value))
+ if (DartDOMWrapper::subtypeOf(value, DartCanvasGradient::dartClassId))
return CanvasStyle::createFromGradient(DartCanvasGradient::toNative(value, exception));
- if (DartDOMWrapper::instanceOf<DartCanvasPattern>(domData, value))
+ if (DartDOMWrapper::subtypeOf(value, DartCanvasPattern::dartClassId))
return CanvasStyle::createFromPattern(DartCanvasPattern::toNative(value, exception));
return 0;
« no previous file with comments | « Source/bindings/dart/custom/DartBlobCustom.cpp ('k') | Source/bindings/dart/custom/DartDOMStringListCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698