[webkit-reviews] review denied: [Bug 114529] HeapTimer lifetime should be less complicated : [Attachment 198131] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 15 10:56:22 PDT 2013


Oliver Hunt <oliver at apple.com> has denied Mark Hahnenberg
<mhahnenberg at apple.com>'s request for review:
Bug 114529: HeapTimer lifetime should be less complicated
https://bugs.webkit.org/show_bug.cgi?id=114529

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

------- Additional Comments from Oliver Hunt <oliver at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=198131&action=review


> Source/JavaScriptCore/testRegExp.cpp:504
> -    RefPtr<JSGlobalData> globalData = JSGlobalData::create(LargeHeap);
> -    JSLockHolder lock(globalData.get());
> +    JSGlobalData* globalData = JSGlobalData::create(LargeHeap).leakRef();
> +    APIEntryShim shim(globalData);

Why can't we use a refptr here anymore?

> Source/JavaScriptCore/API/APIShims.h:55
>      JSGlobalData* m_globalData;

Just make m_globalData a RefPtr<> now

> Source/JavaScriptCore/API/APIShims.h:79
> +	   RefPtr<JSLock> apiLock = &m_globalData->apiLock();
> +	   m_globalData->deref();
> +	   apiLock->unlock();

Just make APIEntryShim have a JSLockHolder to hold on to apiLock, if it's still
strictly necessary you can just do m_globalData.clear()


More information about the webkit-reviews mailing list