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

Unified Diff: third_party/WebKit/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp

Issue 67141: AtomicString usage improvements in v8 interceptors. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 8 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/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp
===================================================================
--- third_party/WebKit/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp (revision 13552)
+++ third_party/WebKit/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp (working copy)
@@ -48,8 +48,9 @@
// Only handle document.all. Insert the marker object into the
// shadow internal field to signal that document.all is no longer
// shadowed.
- String key = toWebCoreString(name);
- if (key != "all")
+ AtomicString key = v8StringToAtomicWebCoreString(name);
+ static const AtomicString all("all");
+ if (key != all)
return deletionNotHandledByInterceptor();
ASSERT(info.Holder()->InternalFieldCount() == kHTMLDocumentInternalFieldCount);
@@ -61,12 +62,13 @@
NAMED_PROPERTY_GETTER(HTMLDocument)
{
INC_STATS("DOM.HTMLDocument.NamedPropertyGetter");
- AtomicString key = toWebCoreString(name);
+ AtomicString key = v8StringToAtomicWebCoreString(name);
// Special case for document.all. If the value in the shadow
// internal field is not the marker object, then document.all has
// been temporarily shadowed and we return the value.
- if (key == "all") {
+ static const AtomicString all("all");
+ if (key == all) {
ASSERT(info.Holder()->InternalFieldCount() == kHTMLDocumentInternalFieldCount);
v8::Local<v8::Value> marker = info.Holder()->GetInternalField(kHTMLDocumentMarkerIndex);
v8::Local<v8::Value> value = info.Holder()->GetInternalField(kHTMLDocumentShadowIndex);
« no previous file with comments | « third_party/WebKit/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698