[webkit-reviews] review granted: [Bug 94573] [V8] Remove getToStringName() and getToStringTemplate() from V8PerIsolateData : [Attachment 159645] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 21 07:50:24 PDT 2012


Adam Barth <abarth at webkit.org> has granted Kentaro Hara
<haraken at chromium.org>'s request for review:
Bug 94573: [V8] Remove getToStringName() and getToStringTemplate() from
V8PerIsolateData
https://bugs.webkit.org/show_bug.cgi?id=94573

Attachment 159645: Patch
https://bugs.webkit.org/attachment.cgi?id=159645&action=review

------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=159645&action=review


> Source/WebCore/bindings/v8/V8Binding.cpp:-354
> -    v8::Persistent<v8::FunctionTemplate>& toStringTemplate =
V8PerIsolateData::current()->toStringTemplate();
> -    if (toStringTemplate.IsEmpty())
> -	   toStringTemplate =
v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New(constructor
ToString));

I mean, this used to store the persistent handle because toStringTemplate is a
non-const reference.  However, it's not very clear code!  :)

> Source/WebCore/bindings/v8/V8PerIsolateData.h:55
> +v8::Handle<v8::Value> constructorOfToString(const v8::Arguments&);

Should we make this a static function in V8PerIsolateData?  That way we could
make it private.


More information about the webkit-reviews mailing list