Changeset 62962 in webkit
- Timestamp:
- Jul 9, 2010 10:06:04 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r62961 r62962 1 2010-07-09 Vitaly Repeshko <vitalyr@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 [v8] Call JS gc in a fresh context to avoid retaining the current one. 6 https://bugs.webkit.org/show_bug.cgi?id=41963 7 http://crbug.com/46571 8 9 * bindings/v8/ScriptController.cpp: 10 (WebCore::ScriptController::collectGarbage): 11 1 12 2010-07-09 Kenneth Russell <kbr@google.com> 2 13 -
trunk/WebCore/bindings/v8/ScriptController.cpp
r62380 r62962 291 291 { 292 292 v8::HandleScope handleScope; 293 v8::Handle<v8::Context> v8Context = V8Proxy::mainWorldContext(m_proxy->frame()); 293 294 v8::Persistent<v8::Context> v8Context = v8::Context::New(); 294 295 if (v8Context.IsEmpty()) 295 296 return; 296 297 v8::Context::Scope scope(v8Context); 298 299 m_proxy->evaluate(ScriptSourceCode("if (window.gc) void(gc());"), 0); 297 { 298 v8::Context::Scope scope(v8Context); 299 v8::Local<v8::String> source = v8::String::New("if (gc) gc();"); 300 v8::Local<v8::String> name = v8::String::New("gc"); 301 v8::Handle<v8::Script> script = v8::Script::Compile(source, name); 302 if (!script.IsEmpty()) 303 script->Run(); 304 } 305 v8Context.Dispose(); 300 306 } 301 307
Note: See TracChangeset
for help on using the changeset viewer.