WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 120898
Stop using fastNew/fastDelete in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=120898
Summary
Stop using fastNew/fastDelete in JavaScriptCore
Anders Carlsson
Reported
2013-09-06 15:05:45 PDT
Stop using fastNew/fastDelete in JavaScriptCore
Attachments
Patch
(31.85 KB, patch)
2013-09-06 15:10 PDT
,
Anders Carlsson
oliver
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Anders Carlsson
Comment 1
2013-09-06 15:10:28 PDT
Created
attachment 210804
[details]
Patch
Andreas Kling
Comment 2
2013-09-06 15:15:55 PDT
Comment on
attachment 210804
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=210804&action=review
> Source/JavaScriptCore/runtime/VM.cpp:160 > + , arrayConstructorTable(adoptPtr(new HashTable(JSC::arrayConstructorTable))) > + , arrayPrototypeTable(adoptPtr(new HashTable(JSC::arrayPrototypeTable))) > + , booleanPrototypeTable(adoptPtr(new HashTable(JSC::booleanPrototypeTable)))
Perhaps we should add a HashTable::create() helper that returns a PassOwnPtr? We don't want to put these on the stack anywhere right?
> Source/JavaScriptCore/runtime/VM.h:227 > + OwnPtr<const HashTable> arrayConstructorTable; > + OwnPtr<const HashTable> arrayPrototypeTable; > + OwnPtr<const HashTable> booleanPrototypeTable;
You could make these "const OwnPtr<const HashTable>" to prevent changes post-construction.
Anders Carlsson
Comment 3
2013-09-06 15:18:15 PDT
(In reply to
comment #2
)
> (From update of
attachment 210804
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=210804&action=review
> > > Source/JavaScriptCore/runtime/VM.cpp:160 > > + , arrayConstructorTable(adoptPtr(new HashTable(JSC::arrayConstructorTable))) > > + , arrayPrototypeTable(adoptPtr(new HashTable(JSC::arrayPrototypeTable))) > > + , booleanPrototypeTable(adoptPtr(new HashTable(JSC::booleanPrototypeTable))) > > Perhaps we should add a HashTable::create() helper that returns a PassOwnPtr? > We don't want to put these on the stack anywhere right?
I’d rather we add a makeOwned function template so you can do arrayConstructorTable(makeOwned<HashTable>()) and have things just work. I want to do that after we’ve gotten rid of PassOwnPtr though.
> > > Source/JavaScriptCore/runtime/VM.h:227 > > + OwnPtr<const HashTable> arrayConstructorTable; > > + OwnPtr<const HashTable> arrayPrototypeTable; > > + OwnPtr<const HashTable> booleanPrototypeTable; > > You could make these "const OwnPtr<const HashTable>" to prevent changes post-construction.
Good idea!
Anders Carlsson
Comment 4
2013-09-06 15:31:15 PDT
Committed
r155219
: <
http://trac.webkit.org/changeset/155219
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug