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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2530243002: Crash in blink::getTypeExtension (Closed)
Patch Set: Updated after review 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 696a3f2a897752505930b541a4dc930940e74ff4..a8af0083262eefdad528905e48f5670370ab4d9a 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -689,10 +689,15 @@ String getTypeExtension(Document* document,
ElementCreationOptions impl;
V8ElementCreationOptions::toImpl(dict.isolate(), dict.v8Value(), impl,
exceptionState);
+ if (exceptionState.hadException())
+ return emptyString();
+
if (impl.hasIs())
return impl.is();
- return toCoreString(dict.v8Value()->ToString());
+ // Do not handle stringification, but count it as a string handling
dominicc (has gone to gerrit) 2017/01/19 05:34:46 This changes behavior because we won't toString th
Anton Obzhirov 2017/01/19 16:45:44 I think no need to count this case it should be ve
+ UseCounter::count(document,
+ UseCounter::DocumentCreateElement2ndArgStringHandling);
}
return emptyString();

Powered by Google App Engine
This is Rietveld 408576698