[Webkit-unassigned] [Bug 77493] PopStateEvent.state should use the same object as history.state

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 15 15:39:38 PST 2012


--- Comment #9 from Adam Barth <abarth at webkit.org>  2012-02-15 15:39:38 PST ---
(From update of attachment 126594)
View in context: https://bugs.webkit.org/attachment.cgi?id=126594&action=review

This feels more complicated than it should be, but I don't immediately see a way to simplify it.  Can we try for a version that doesn't use goto?

> Source/WebCore/bindings/js/JSPopStateEventCustom.cpp:50
> +    History* history;
> +    bool isSameState;

Generally we like to declare variables at the same time as they're initialized.  Here, we should move the History* history declaration to line 57

> Source/WebCore/bindings/js/JSPopStateEventCustom.cpp:54
> +        goto saveResultAndReturnIt;

There's got to be a better way to structure this code than to use goto.  Perhaps use a helper function that returns the proper result?

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list