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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/custom/V8CustomXPathNSResolver.cpp

Issue 2723973002: Make V8Binding helpers return LocalFrame/LocalDOMWindow as appropriate (Closed)
Patch Set: . Created 3 years, 9 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/bindings/core/v8/custom/V8CustomXPathNSResolver.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8CustomXPathNSResolver.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8CustomXPathNSResolver.cpp
index 5a6a071cf05a0a30a9aaca505cc273a38dad38f4..19971381ff9475873d3486b6b0e5d37a6cb153e5 100644
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8CustomXPathNSResolver.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8CustomXPathNSResolver.cpp
@@ -65,9 +65,8 @@ AtomicString V8CustomXPathNSResolver::lookupNamespaceURI(const String& prefix) {
lookupNamespaceURIFunc = v8::Local<v8::Function>::Cast(lookupNamespaceURI);
if (lookupNamespaceURIFunc.IsEmpty() && !m_resolver->IsFunction()) {
- LocalFrame* frame =
- toLocalDOMWindow(toDOMWindow(m_scriptState->context()))->frame();
- if (frame && frame->host())
+ LocalFrame* frame = toLocalFrameIfNotDetached(m_scriptState->context());
+ if (frame)
frame->console().addMessage(ConsoleMessage::create(
JSMessageSource, ErrorMessageLevel,
"XPathNSResolver does not have a lookupNamespaceURI method."));

Powered by Google App Engine
This is Rietveld 408576698