Closed
Bug 158475
Opened 22 years ago
Closed 21 years ago
JS Console shouldn't remember previous execution state
Categories
(Core Graveyard :: Error Console, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: neil, Assigned: neil)
Details
(Keywords: polish)
Attachments
(1 file)
(deleted),
patch
|
timeless
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
Using Build ID: 2002071904
Expressions to evaluate to reproduce problem:
1. const b = false; b;
2. const b = true; b;
3. b;
4. b;
Expected results: false, true, error, error
Actual results: false, error, false, error
Assignee | ||
Comment 1•22 years ago
|
||
Assignee | ||
Updated•22 years ago
|
Assignee | ||
Updated•22 years ago
|
Attachment #92096 -
Flags: superreview?(bzbarsky)
Attachment #92096 -
Flags: review?(timeless)
Comment 2•22 years ago
|
||
Comment on attachment 92096 [details] [diff] [review]
Proposed patch
I don't know how this code works and I don't think my review would mean
anything. Please have someone familiar with this code review.
Attachment #92096 -
Flags: superreview?(bzbarsky)
Attachment #92096 -
Flags: superreview?(ben)
Attachment #92096 -
Flags: review?(timeless)
Attachment #92096 -
Flags: review+
Attachment #92096 -
Flags: superreview?(ben) → superreview?(jaggernaut)
Comment 3•22 years ago
|
||
Hmm, not sure if this is the right fix. What's causing us to forget about |b| in
this case? Why doesn't that kick in immediately?
> var b = 3; b
3
> b
3
> b
Error: b is not defined
Btw, why should the JS console not remember its previous execution state? I've
found that very useful in some cases. It would turn the JS console into a kind
of js shell.
Assignee | ||
Comment 4•22 years ago
|
||
jag, what seems to happen is that the javascript: var b = 3; b creates a
document where b is 3. The subsequent javscript: b evaluates b as 3 and creates
a new document where b is undefined. Then the next javascript: b fails.
Note that when javascript: statements don't have a result then they don't create
a new document e.g. javascript: var b = 3; javascript: alert(b); javascript:
alert(b); alerts 3 twice.
Comment 5•21 years ago
|
||
jag --
I think it's expected that the Console has no state.
However, it would probably be useful to have the console have an option (perhaps
as a menu option that could be checked) to remember its state. If that seems
rational, I could file an RFE.
Also, is that the correct QA contact for this bug?
-M
Assignee | ||
Comment 6•21 years ago
|
||
Comment on attachment 92096 [details] [diff] [review]
Proposed patch
Since iframes now have attribute optimization you can't evaluate Math.random()
etc. multiple times without this patch either.
Attachment #92096 -
Flags: superreview?(jag) → superreview?(roc)
Comment on attachment 92096 [details] [diff] [review]
Proposed patch
OK ... but what do you mean by "attribute optimization"?
Attachment #92096 -
Flags: superreview?(roc) → superreview+
Assignee | ||
Comment 8•21 years ago
|
||
Whoops, checked this in two weeks ago :-[
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Product: Core → SeaMonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•