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

Unified Diff: Source/bindings/v8/custom/V8CustomXPathNSResolver.cpp

Issue 108543003: Consistently use AtomicString for namespaceURI / prefix (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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: Source/bindings/v8/custom/V8CustomXPathNSResolver.cpp
diff --git a/Source/bindings/v8/custom/V8CustomXPathNSResolver.cpp b/Source/bindings/v8/custom/V8CustomXPathNSResolver.cpp
index ca7eb5b93a8c993490e55a453ca6d8c7e2ce1b91..f2c4d730d24cc8df9aaaed605b06b90e0d3c10d0 100644
--- a/Source/bindings/v8/custom/V8CustomXPathNSResolver.cpp
+++ b/Source/bindings/v8/custom/V8CustomXPathNSResolver.cpp
@@ -58,7 +58,7 @@ V8CustomXPathNSResolver::~V8CustomXPathNSResolver()
{
}
-String V8CustomXPathNSResolver::lookupNamespaceURI(const String& prefix)
+AtomicString V8CustomXPathNSResolver::lookupNamespaceURI(const String& prefix)
{
v8::Handle<v8::Function> lookupNamespaceURIFunc;
v8::Handle<v8::String> lookupNamespaceURIName = v8AtomicString(m_isolate, "lookupNamespaceURI");
@@ -74,7 +74,7 @@ String V8CustomXPathNSResolver::lookupNamespaceURI(const String& prefix)
Frame* frame = activeDOMWindow()->frame();
if (frame && frame->page())
frame->page()->console().addMessage(JSMessageSource, ErrorMessageLevel, "XPathNSResolver does not have a lookupNamespaceURI method.");
- return String();
+ return nullAtom;
}
// Catch exceptions from calling the namespace resolver.
@@ -89,9 +89,10 @@ String V8CustomXPathNSResolver::lookupNamespaceURI(const String& prefix)
// Eat exceptions from namespace resolver and return an empty string. This will most likely cause NamespaceError.
if (tryCatch.HasCaught())
- return String();
+ return nullAtom;
- return toWebCoreStringWithNullCheck(retval);
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<WithNullCheck>, returnString, retval, nullAtom);
+ return returnString;
}
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698