[Webkit-unassigned] [Bug 23223] Teach ScheduledAction how to execute script in WorkerContext, in addition to a Document.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Jan 10 14:40:37 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=23223
darin at apple.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #26590|review? |review+
Flag| |
------- Comment #6 from darin at apple.com 2009-01-10 14:40 PDT -------
(From update of attachment 26590)
> + if (context->isDocument())
> + execute(static_cast<Document*>(context));
> +#if ENABLE(WORKERS)
> + else {
> + ASSERT(context->isWorkerContext());
> + execute(static_cast<WorkerContext*>(context));
> + }
> +#else
> ASSERT(context->isDocument());
> +#endif
I think the code above is unnecessarily twisted. How about this?
#if !ENABLE(WORKERS)
ASSERT(context->isDocument());
execute(static_cast<Document*>(context));
#else
if (context->isDocument())
execute(static_cast<Document*>(context));
else {
ASSERT(context->isWorkerContext());
execute(static_cast<WorkerContext*>(context));
}
#endif
I think Alexey's other original comments are definitely worth considering too.
But this patch seems OK to land as-is.
r=me
--
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