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

Unified Diff: Source/WebCore/bindings/v8/V8Proxy.h

Issue 7189061: Merge 89236 - 2011-06-19 Mads Ager <ager@chromium.org> (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 6 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 | « no previous file | Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/bindings/v8/V8Proxy.h
===================================================================
--- Source/WebCore/bindings/v8/V8Proxy.h (revision 89246)
+++ Source/WebCore/bindings/v8/V8Proxy.h (working copy)
@@ -416,10 +416,18 @@
return v8::Undefined();
}
- template <class T> inline v8::Handle<v8::Object> toV8(PassRefPtr<T> object, v8::Local<v8::Object> holder)
+ enum IndependentMode {
+ MarkIndependent,
+ DoNotMarkIndependent
+ };
+
+ template <class T> inline v8::Handle<v8::Object> toV8(PassRefPtr<T> object, v8::Local<v8::Object> holder, IndependentMode independent = DoNotMarkIndependent)
{
object->ref();
- V8DOMWrapper::setJSWrapperForDOMObject(object.get(), v8::Persistent<v8::Object>::New(holder));
+ v8::Persistent<v8::Object> handle = v8::Persistent<v8::Object>::New(holder);
+ if (independent == MarkIndependent)
+ handle.MarkIndependent();
+ V8DOMWrapper::setJSWrapperForDOMObject(object.get(), handle);
return holder;
}
« no previous file with comments | « no previous file | Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698