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

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

Issue 2530243002: Crash in blink::getTypeExtension (Closed)
Patch Set: Updated test and removed extra use count after review. Created 3 years, 11 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/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 28b112be99449b67dc8eb19bb4ba095de02305ce..6a62ef9b7fe252eb90a8a88e67d528da0515cf85 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -690,10 +690,11 @@ 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());
}
return emptyString();

Powered by Google App Engine
This is Rietveld 408576698