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

Unified Diff: third_party/WebKit/Source/core/css/FontFaceSet.cpp

Issue 1481983002: Drop [LegacyInterfaceTypeChecking] where trivial in core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more tests Created 5 years, 1 month 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/css/FontFaceSet.cpp
diff --git a/third_party/WebKit/Source/core/css/FontFaceSet.cpp b/third_party/WebKit/Source/core/css/FontFaceSet.cpp
index a31104c7e6ff2d91f6a60227b5c2f44f5242d496..b802f2f13c78190d41c51efe9cea3f47b892e9f0 100644
--- a/third_party/WebKit/Source/core/css/FontFaceSet.cpp
+++ b/third_party/WebKit/Source/core/css/FontFaceSet.cpp
@@ -257,14 +257,11 @@ ScriptPromise FontFaceSet::ready(ScriptState* scriptState)
return m_ready->promise(scriptState->world());
}
-PassRefPtrWillBeRawPtr<FontFaceSet> FontFaceSet::addForBinding(ScriptState*, FontFace* fontFace, ExceptionState& exceptionState)
+PassRefPtrWillBeRawPtr<FontFaceSet> FontFaceSet::addForBinding(ScriptState*, FontFace* fontFace, ExceptionState&)
{
+ ASSERT(fontFace);
if (!inActiveDocumentContext())
return this;
- if (!fontFace) {
- exceptionState.throwTypeError("The argument is not a FontFace.");
- return this;
- }
if (m_nonCSSConnectedFaces.contains(fontFace))
return this;
if (isCSSConnectedFontFace(fontFace))
@@ -293,14 +290,11 @@ void FontFaceSet::clearForBinding(ScriptState*, ExceptionState&)
fontSelector->fontFaceInvalidated();
}
-bool FontFaceSet::deleteForBinding(ScriptState*, FontFace* fontFace, ExceptionState& exceptionState)
+bool FontFaceSet::deleteForBinding(ScriptState*, FontFace* fontFace, ExceptionState&)
{
+ ASSERT(fontFace);
if (!inActiveDocumentContext())
return false;
- if (!fontFace) {
- exceptionState.throwTypeError("The argument is not a FontFace.");
- return false;
- }
WillBeHeapListHashSet<RefPtrWillBeMember<FontFace>>::iterator it = m_nonCSSConnectedFaces.find(fontFace);
if (it != m_nonCSSConnectedFaces.end()) {
m_nonCSSConnectedFaces.remove(it);
@@ -314,14 +308,11 @@ bool FontFaceSet::deleteForBinding(ScriptState*, FontFace* fontFace, ExceptionSt
return false;
}
-bool FontFaceSet::hasForBinding(ScriptState*, FontFace* fontFace, ExceptionState& exceptionState) const
+bool FontFaceSet::hasForBinding(ScriptState*, FontFace* fontFace, ExceptionState&) const
{
+ ASSERT(fontFace);
if (!inActiveDocumentContext())
return false;
- if (!fontFace) {
- exceptionState.throwTypeError("The argument is not a FontFace.");
- return false;
- }
return m_nonCSSConnectedFaces.contains(fontFace) || isCSSConnectedFontFace(fontFace);
}
« no previous file with comments | « third_party/WebKit/Source/core/clipboard/DataTransfer.idl ('k') | third_party/WebKit/Source/core/css/FontFaceSet.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698