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

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

Issue 2530243002: Crash in blink::getTypeExtension (Closed)
Patch Set: Crash in blink::getTypeExtension 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/custom/crash-in-getTypeExtension.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 987f43e2c966951bc6e1f3cf4a3d0644d1e95c0b..6366ad7e02ade36f65937688ddca1d8b59f5c748 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;
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/custom/crash-in-getTypeExtension.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698