[Webkit-unassigned] [Bug 10114] Exceptions thrown by WebKitPlugins are ignored

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Mon Jul 31 16:02:18 PDT 2006


ggaren at apple.com changed:

           What    |Removed                     |Added
   Attachment #9688|review?                     |review-
               Flag|                            |

------- Comment #5 from ggaren at apple.com  2006-07-31 16:02 PDT -------
(From update of attachment 9688)
I don't think it's right for the WebScriptObject API to be responsible for
tracking the current ExecState. That's really a job for the JS engine. We
attempted a similar hack to this one in JavaScriptGlue, and bad things happened
(crashes, incompatibilities when the engine changed, mismatches between the
stored ExecState and the real one). There's also the threading issue you
mention, if we add support for ObjC plug-ins to the JS API.

The interpreter knows about the global ExecState and the most nested Context. I
think a better solution would be to use that model. Giving Context a
back-pointer to its sibling ExecState (ExecState already keeps a pointer to its
sibling Context) is probably easiest. Then you can write code like this:

throwError(interp->context()->execState(), GeneralError, exceptionMessage);

Since Context and ExecState should probably merge in the end, the code can
eventually become this:

throwError(interp->context(), GeneralError, exceptionMessage);

For now, a Context is transient and stack-allocated, so there aren't any
ownership issues to worry about.

Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list