Closed
Bug 525181
Opened 15 years ago
Closed 14 years ago
IPDL: Implement "soft" dynamic checking of protocol state in generated C++
Categories
(Core :: IPC, enhancement)
Core
IPC
Tracking
()
RESOLVED
FIXED
People
(Reporter: cjones, Assigned: cjones)
References
Details
Attachments
(4 files)
12.08 KB,
patch
|
bent.mozilla
:
review+
|
Details | Diff | Splinter Review |
11.14 KB,
patch
|
bent.mozilla
:
review+
|
Details | Diff | Splinter Review |
8.44 KB,
patch
|
bent.mozilla
:
review+
|
Details | Diff | Splinter Review |
8.23 KB,
patch
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•14 years ago
|
||
Attachment #450820 -
Flags: review?(bent.mozilla)
Assignee | ||
Comment 2•14 years ago
|
||
Attachment #450821 -
Flags: review?(bent.mozilla)
Assignee | ||
Comment 3•14 years ago
|
||
Attachment #450822 -
Flags: review?(bent.mozilla)
Assignee | ||
Comment 4•14 years ago
|
||
Assignee | ||
Comment 5•14 years ago
|
||
jduell, quick warning --- these patches by themselves probably won't be enough to implement state checking for necko (we're still a decent ways away from the whole enchilada). Bug 533002 ought to be enough, though, so you might want to block on that.
Assignee | ||
Updated•14 years ago
|
Summary: IPDL: Turn on dynamic protocol state-machine checking in generated C++ → IPDL: Implement "soft" dynamic checking of protocol state in generated C++
Assignee | ||
Comment 6•14 years ago
|
||
Review ping.
Assignee | ||
Comment 7•14 years ago
|
||
Review ping.
Damn! How did I forget this again?!
Sorry, I'll get it tomorrow.
Comment on attachment 450820 [details] [diff] [review]
Fix up the stub C++ implementation of protocol states in actor classes. Add a special NULL state (that only transitions to -->Null and -->Dead) for stateless protocols
>+ stmts.append(StmtExpr(ExprAssn(_actorState(actorvar),
>+ _startState(actorproto))))
>+
>+ return stmts
I don't quite get why you changed to using append() rather than adding to the list, is that intentional?
Attachment #450820 -
Flags: review?(bent.mozilla) → review+
Comment on attachment 450821 [details] [diff] [review]
part 2: Implement protocol state machines in C++
>+ Trigger(Action _action, int32 _msg) :
Bah, leading underscores?
Attachment #450821 -
Flags: review?(bent.mozilla) → review+
Comment on attachment 450822 [details] [diff] [review]
part 3: Turn on "soft" state checking, NS_WARNING()ing on bad transitions
>+ # FIXME: make this a FatalError()
>+ ifbad.addifstmt(_printWarningMessage('bad state transition!'))
You could make a _handleBadTransition function maybe? Then switching behavior down the road might be more intuitive.
Attachment #450822 -
Flags: review?(bent.mozilla) → review+
Assignee | ||
Comment 12•14 years ago
|
||
(In reply to comment #9)
> Comment on attachment 450820 [details] [diff] [review]
> Fix up the stub C++ implementation of protocol states in actor classes. Add a
> special NULL state (that only transitions to -->Null and -->Dead) for stateless
> protocols
>
> >+ stmts.append(StmtExpr(ExprAssn(_actorState(actorvar),
> >+ _startState(actorproto))))
> >+
> >+ return stmts
>
> I don't quite get why you changed to using append() rather than adding to the
> list, is that intentional?
Hm, looks like brain damage. I think that code used to be in a |if hasstate:| block or similar and that the condition went away. Thanks for the catch.
Assignee | ||
Comment 13•14 years ago
|
||
(In reply to comment #10)
> Comment on attachment 450821 [details] [diff] [review]
> part 2: Implement protocol state machines in C++
>
> >+ Trigger(Action _action, int32 _msg) :
>
> Bah, leading underscores?
Alright alright, I'll use mFoo fields ;). *holds nose*
Assignee | ||
Comment 14•14 years ago
|
||
(In reply to comment #11)
> Comment on attachment 450822 [details] [diff] [review]
> part 3: Turn on "soft" state checking, NS_WARNING()ing on bad transitions
>
> >+ # FIXME: make this a FatalError()
> >+ ifbad.addifstmt(_printWarningMessage('bad state transition!'))
>
> You could make a _handleBadTransition function maybe? Then switching behavior
> down the road might be more intuitive.
Good idea, done.
Assignee | ||
Comment 15•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/8bcc9c92b9c6
http://hg.mozilla.org/mozilla-central/rev/dc0f5b0bae97
http://hg.mozilla.org/mozilla-central/rev/2c920c17f9a3
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•