WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
53902
JSVariableObject::setRegisters should take PassOwnArrayPtr for registersArray.
https://bugs.webkit.org/show_bug.cgi?id=53902
Summary
JSVariableObject::setRegisters should take PassOwnArrayPtr for registersArray.
Ryosuke Niwa
Reported
2011-02-06 21:53:14 PST
JSVariableObject::setRegisters currently takes two pointers to Register but registersArray should be PassOwnArrayPtr instead.
Attachments
Patch
(5.76 KB, patch)
2011-02-06 22:40 PST
,
Ryosuke Niwa
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2011-02-06 22:40:29 PST
Created
attachment 81449
[details]
Patch
Darin Adler
Comment 2
2011-02-07 08:17:32 PST
Comment on
attachment 81449
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=81449&action=review
> Source/JavaScriptCore/runtime/JSVariableObject.h:162 > + ASSERT(registerArray.get() != d->registerArray.get());
I’m surprised that either get() is required. We should make the smart pointers work for equality comparison without using the get().
Ryosuke Niwa
Comment 3
2011-02-07 18:26:17 PST
(In reply to
comment #2
)
> (From update of
attachment 81449
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=81449&action=review
> > > Source/JavaScriptCore/runtime/JSVariableObject.h:162 > > + ASSERT(registerArray.get() != d->registerArray.get()); > > I’m surprised that either get() is required. We should make the smart pointers work for equality comparison without using the get().
Oops, no. That's just me being careless. We don't need to call get manually. Will fix before landing the patch.
Ryosuke Niwa
Comment 4
2011-02-07 19:29:18 PST
Comment on
attachment 81449
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=81449&action=review
> Source/JavaScriptCore/runtime/Arguments.h:251 > + OwnArrayPtr<Register> registerArray = copyRegisterArray(d()->registers - registerOffset, registerArraySize); > + setRegisters(registerArray.get() + registerOffset, registerArray.release());
Oops, I need a temporary variable for this as well. Will fix before landing.
Darin Adler
Comment 5
2011-02-07 20:12:42 PST
(In reply to
comment #4
)
> View in context:
https://bugs.webkit.org/attachment.cgi?id=81449&action=review
> > > Source/JavaScriptCore/runtime/Arguments.h:251 > > + OwnArrayPtr<Register> registerArray = copyRegisterArray(d()->registers - registerOffset, registerArraySize); > > + setRegisters(registerArray.get() + registerOffset, registerArray.release()); > > Oops, I need a temporary variable for this as well. Will fix before landing.
Oh, can’t believe I missed that!
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