Commit 884d8f3e authored by philipj's avatar philipj Committed by Commit bot

Add [TypeChecking=Interface] to the V8Path2D interface

This affects the generated code of the constructor, which will now throw
a TypeError if "parameter 1 is not of type 'Path2D'."

However, this code path is unreachable, because there's a type check
(V8Path2D::hasInstance()) to determine that this form of the constructor
should be used.

Promoting [TypeChecking=Interface] to the interface level will make it
possible to make [TypeChecking=Interface] the default without changing
the generated code for this interface.

BUG=462561

Review URL: https://codereview.chromium.org/1471563002

Cr-Commit-Position: refs/heads/master@{#361317}
parent beb1b77d
......@@ -33,9 +33,10 @@
Constructor(Path2D path),
Constructor(DOMString text),
GarbageCollected,
TypeChecking=Interface,
] interface Path2D {
[RuntimeEnabled=ExperimentalCanvasFeatures, TypeChecking=Interface] void addPath(Path2D path, optional SVGMatrix? transform);
[RuntimeEnabled=ExperimentalCanvasFeatures] void addPath(Path2D path, optional SVGMatrix? transform);
};
Path2D implements CanvasPathMethods;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment