[Webkit-unassigned] [Bug 21918] A JavaScript Exception abstraction
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 29 23:46:29 PDT 2008
https://bugs.webkit.org/show_bug.cgi?id=21918
sam at webkit.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #24718|review? |review-
Flag| |
------- Comment #4 from sam at webkit.org 2008-10-29 23:46 PDT -------
(From update of attachment 24718)
> +
> +#include <wtf/Noncopyable.h>
> +#include "ScriptController.h"
These should be sorted.
> +
> +typedef JSC::JSValue* JSException;
No JSException is being defined for V8 here. I don't really see the point of
this typedef since JSException is never used.
> +#if USE(V8)
> +class ExceptionCatcher;
What does an ExceptionCatcher do? Why is necessary to store both it and the
exception.
> + ExceptionContext(Node*);
> +#if USE(V8)
> + ExceptionContext();
How is this empty constructor used. Perhaps a link to the corresponding
Chromium code would help.
> + bool hadException();
> + JSException exception() const;
This method seems to be unused.
> +
> + // Returns a non-exception code object.
> + static JSException noException();
As does this one.
> +
> +private:
> +#if USE(V8)
> + friend class ExceptionCatcher;
> + void setException(JSException exception) { m_exception = exception; }
> + void setExceptionCatcher(ExceptionCatcher*);
> + JSException m_exception;
> + ExceptionCatcher* m_exceptionCatcher;
> +#elif USE(JSC)
> + JSC::ExecState* m_exec;
> +#endif
This is a lot of engine specific code. Can this be abstracted better?
It also seems like this is something that should work with other bindings as
well. So that a Objective-C NodeFilter could store a thrown exception as well.
r-.
--
Configure bugmail: https://bugs.webkit.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