Closed
Bug 901362
Opened 11 years ago
Closed 11 years ago
Refactor nsJSUtils::EvaluateString to take an option object and optionally propagate exceptions
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: bholley, Assigned: bholley)
References
Details
Attachments
(2 files)
5.36 KB,
patch
|
gkrizsanits
:
review+
|
Details | Diff | Splinter Review |
3.57 KB,
patch
|
gkrizsanits
:
review+
|
Details | Diff | Splinter Review |
This is the refactoring I proposed in bug 877673 comment 42.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #785561 -
Flags: review?(gkrizsanits)
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #785562 -
Flags: review?(gkrizsanits)
Comment 3•11 years ago
|
||
Comment on attachment 785561 [details] [diff] [review] Part 1 - Refactor nsJSUtils::EvaluateString to take an EvaluateOptions structure. v1 Review of attachment 785561 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/base/nsJSEnvironment.cpp @@ +1254,2 @@ > rv = nsJSUtils::EvaluateString(mContext, aScript, aScopeObject, > + aCompileOptions, evalOptions, aRetValue); While you're here, please fix the indentation? ::: dom/base/nsJSUtils.h @@ +71,5 @@ > + {} > + > + EvaluateOptions& setCoerceToString(bool aCoerce) { > + coerceToString = aCoerce; > + return *this; (I really don't like this chaining pattern.)
Comment 4•11 years ago
|
||
Comment on attachment 785561 [details] [diff] [review] Part 1 - Refactor nsJSUtils::EvaluateString to take an EvaluateOptions structure. v1 Review of attachment 785561 [details] [diff] [review]: ----------------------------------------------------------------- Setters on EvaluateOptions do not make much sense to me, since the members are public... Ofc for chaining them, they could be handy I just don't see that happening... the idea is that this struct will have many members like the CompileOptions in the future?
Attachment #785561 -
Flags: review?(gkrizsanits) → review+
Updated•11 years ago
|
Attachment #785562 -
Flags: review?(gkrizsanits) → review+
Assignee | ||
Comment 5•11 years ago
|
||
(In reply to :Ms2ger from comment #3) > (I really don't like this chaining pattern.) (In reply to Gabor Krizsanits [:krizsa :gabor] (moving to Berlin: in and out for a few weeks) from comment #4) > Setters on EvaluateOptions do not make much sense to me, since the members > are public... Ofc for chaining them, they could be handy I just don't see > that happening... the idea is that this struct will have many members like > the CompileOptions in the future? I'm mostly just interested in following the established JSAPI pattern on this (see CompartmentOptions, CompileOptions, etc).
Assignee | ||
Comment 6•11 years ago
|
||
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/dacad5a40811 remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/901902206d27
Comment 7•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/dacad5a40811 https://hg.mozilla.org/mozilla-central/rev/901902206d27
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•