Status

()

Core
JavaScript Engine
7 years ago
7 years ago

People

(Reporter: John J. Barton, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [firebug-p3])

(Reporter)

Description

7 years ago
As far as I am able to tell, calling the magic function "next()" on the object returned by calling a function with the keyword 'yield' causes jsd to stop working properly.

Test Case
http://getfirebug.com/tests/content//branches/1.8/script/yield/simpleGenerator.html

Instructions are the page. 

When get to step 7 I see the following in Firebug tracing:
into interruptHook pc:17 frameLineId: 10110@13^0 vs 10110@13^0 running 10110 of http://getfirebug.com/tests/content//branches/1.8/script/yield/simpleGenerator.html at 13.17
8
		into interruptHook pc:20 frameLineId: 10110@13^0 vs 10110@13^0 running 10110 of http://getfirebug.com/tests/content//branches/1.8/script/yield/simpleGenerator.html at 13.20
9
		into interruptHook pc:23 frameLineId: 10110@13^0 vs 10110@13^0 running 10110 of http://getfirebug.com/tests/content//branches/1.8/script/yield/simpleGenerator.html at 13.23
10
		into interruptHook pc:26 frameLineId: 10110@13^0 vs 10110@13^0 running 10110 of http://getfirebug.com/tests/content//branches/1.8/script/yield/simpleGenerator.html at 13.26
11
		fbs.onError (-5) with this.showStackTrace=false and this.breakOnErrors=false kind=Uncaught-Exception msg=uncaught exception: [object StopIteration]@:0.0

Which means that we hit the interrupt handler 4 times with PC 17, 20, 23, and 26, then the next event is the StopIteration at line 19. No function callbacks seem to appear.
(Reporter)

Comment 1

7 years ago
In addition we need special case code to mark the function that creates a Generator so we can special case the debugger for this thing.
Whiteboard: [firebug-p3]
(Reporter)

Comment 2

7 years ago
Actually this hardly makes sense to me. After the trace above jsd is working. So I guess another explanation would be "jsd breaks generators".
(Reporter)

Updated

7 years ago
Blocks: 641436
(Assignee)

Updated

7 years ago
Component: JavaScript Debugging/Profiling APIs → JavaScript Engine
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.