Changeset 128242 in webkit
- Timestamp:
- Sep 11, 2012 4:49:09 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r128239 r128242 1 2012-09-11 Adam Barth <abarth@chromium.org> 2 3 [V8] 8% regression in dom_perf 4 https://bugs.webkit.org/show_bug.cgi?id=96433 5 6 Reviewed by Kentaro Hara. 7 8 This code used to have a fast path to find the V8PerContextData for DOM 9 nodes. I tried a bunch of variations, but nothing I can come up with is 10 as fast as the old fast path, so I've added back the fast path. 11 12 * bindings/scripts/CodeGeneratorV8.pm: 13 (GenerateToV8Converters): 14 * bindings/v8/V8DOMWrapper.cpp: 15 (WebCore::V8DOMWrapper::instantiateV8Object): 16 * bindings/v8/V8DOMWrapper.h: 17 (V8DOMWrapper): 18 1 19 2012-09-11 Andreas Kling <kling@webkit.org> 2 20 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
r128159 r128242 3359 3359 3360 3360 push(@implContent, <<END); 3361 Document* document = 0; 3362 UNUSED_PARAM(document); 3363 END 3364 3365 if (IsNodeSubType($dataNode)) { 3366 push(@implContent, <<END); 3367 document = impl->document(); 3368 END 3369 } 3370 3371 push(@implContent, <<END); 3361 3372 3362 3373 v8::Handle<v8::Context> context; … … 3369 3380 } 3370 3381 3371 wrapper = V8DOMWrapper::instantiateV8Object( &info, impl.get());3382 wrapper = V8DOMWrapper::instantiateV8Object(document, &info, impl.get()); 3372 3383 3373 3384 if (!context.IsEmpty()) -
trunk/Source/WebCore/bindings/v8/V8DOMWrapper.cpp
r128102 r128242 141 141 } 142 142 143 v8::Local<v8::Object> V8DOMWrapper::instantiateV8Object(WrapperTypeInfo* type, void* impl) 144 { 145 V8PerContextData* perContextData = V8PerContextData::current(); 143 v8::Local<v8::Object> V8DOMWrapper::instantiateV8Object(Document* document, WrapperTypeInfo* type, void* impl) 144 { 145 V8PerContextData* perContextData = 0; 146 147 // If we have a pointer to the frame, we cna get the V8PerContextData 148 // directly, which is faster than going through V8. 149 if (document && document->frame()) 150 perContextData = perContextDataForCurrentWorld(document->frame()); 151 else 152 perContextData = V8PerContextData::current(); 146 153 147 154 v8::Local<v8::Object> instance = perContextData ? perContextData->createWrapperFromCache(type) : V8ObjectConstructor::newInstance(type->getTemplate()->GetFunction()); -
trunk/Source/WebCore/bindings/v8/V8DOMWrapper.h
r128159 r128242 113 113 static void setNamedHiddenReference(v8::Handle<v8::Object> parent, const char* name, v8::Handle<v8::Value> child); 114 114 115 static v8::Local<v8::Object> instantiateV8Object( WrapperTypeInfo*, void*);115 static v8::Local<v8::Object> instantiateV8Object(Document*, WrapperTypeInfo*, void*); 116 116 117 117 static v8::Handle<v8::Object> getCachedWrapper(Node* node)
Note: See TracChangeset
for help on using the changeset viewer.