Closed
Bug 732652
Opened 13 years ago
Closed 13 years ago
Remove JS_GetScriptedCaller
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: dvander, Assigned: dvander)
References
(Blocks 1 open bug)
Details
Attachments
(5 files, 2 obsolete files)
1.31 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
1.21 KB,
patch
|
bent.mozilla
:
review+
|
Details | Diff | Splinter Review |
981 bytes,
patch
|
bholley
:
review+
|
Details | Diff | Splinter Review |
5.29 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
17.89 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
This API call is incompatible with IonMonkey, which does not create JSStackFrames. Most callers of this in the browser just need the topmost script/filename, which we can get easily in other ways.
Assignee | ||
Comment 1•13 years ago
|
||
Assignee | ||
Comment 2•13 years ago
|
||
Assignee | ||
Comment 3•13 years ago
|
||
Assignee | ||
Comment 4•13 years ago
|
||
Assignee | ||
Comment 5•13 years ago
|
||
Assignee | ||
Comment 6•13 years ago
|
||
For the places where we can't get rid of the API outright, the details have been moved into the JS engine where they can be easily maintained. Sending to try...
Assignee | ||
Updated•13 years ago
|
Attachment #603098 -
Flags: review?(mcmanus)
Assignee | ||
Updated•13 years ago
|
Attachment #603099 -
Flags: review?(bent.mozilla)
Assignee | ||
Updated•13 years ago
|
Attachment #603100 -
Flags: review?(bobbyholley+bmo)
Assignee | ||
Comment 7•13 years ago
|
||
Comment on attachment 603101 [details] [diff] [review] fix nsJSEnvironment Note this patch removes the call to SetFrameReturnValue. Luke and I couldn't think of a use case for it - if there is one, I can add it back, but it's unlikely to work with IonMonkey anytime soon.
Attachment #603101 -
Flags: review?(mrbkap)
Assignee | ||
Comment 8•13 years ago
|
||
New API addition and removal of the old API.
Attachment #603096 -
Attachment is obsolete: true
Attachment #603109 -
Attachment is obsolete: true
Attachment #603162 -
Flags: review?(luke)
Comment 9•13 years ago
|
||
Comment on attachment 603100 [details] [diff] [review] fix xpcshell I'm not familiar with this stuff but I'll trust dvander. rs=bholley
Attachment #603100 -
Flags: review?(bobbyholley+bmo) → review+
Updated•13 years ago
|
Attachment #603099 -
Flags: review?(bent.mozilla) → review+
Updated•13 years ago
|
Attachment #603098 -
Flags: review?(mcmanus) → review?(bugs)
Updated•13 years ago
|
Attachment #603101 -
Flags: review?(mrbkap) → review+
Comment 10•13 years ago
|
||
Comment on attachment 603162 [details] [diff] [review] patch Review of attachment 603162 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jsapi.cpp @@ +6668,5 @@ > + *lineno = 0; > + > + for (FrameRegsIter i(cx); !i.done(); ++i) { > + if (script) > + *script = i.script(); Instead of the loop, how about: FrameRegsIter i(cx); if (!i.done()) return false; ? ::: js/src/jsapi.h @@ +5407,5 @@ > + * Return the current script and line number of the most currently running > + * frame. Returns true if a scripted frame was found, false otherwise. > + */ > +extern JS_PUBLIC_API(JSBool) > +JS_DescribeTopFrame(JSContext *cx, JSScript **script, unsigned *lineno); I'd like to avoid any mention of "frame" in JSAPI. How about JS_DescribeScriptedCaller? ::: js/src/jsfun.cpp @@ +783,5 @@ > return true; > > + StackFrame *frame = fp->prev(); > + if (!frame) > + frame = js_GetTopStackFrame(cx, FRAME_EXPAND_ALL); In view of the "if (!fp->prev())" above, this 'if' can be removed.
Attachment #603162 -
Flags: review?(luke) → review+
Comment 11•13 years ago
|
||
Comment on attachment 603098 [details] [diff] [review] fix websockets rs=me
Attachment #603098 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 12•13 years ago
|
||
http://hg.mozilla.org/integration/mozilla-inbound/rev/0215639e611a
Version: unspecified → Trunk
Comment 13•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0215639e611a
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in
before you can comment on or make changes to this bug.
Description
•