[webkit-reviews] review granted: [Bug 122993] Web Inspector: [CSS Regions] Crash when highlighting a node of a flow with no regions : [Attachment 214510] Patch V1

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 17 14:30:13 PDT 2013


Joseph Pecoraro <joepeck at webkit.org> has granted Alexandru Chiculita
<achicu at adobe.com>'s request for review:
Bug 122993: Web Inspector: [CSS Regions] Crash when highlighting a node of a
flow with no regions
https://bugs.webkit.org/show_bug.cgi?id=122993

Attachment 214510: Patch V1
https://bugs.webkit.org/attachment.cgi?id=214510&action=review

------- Additional Comments from Joseph Pecoraro <joepeck at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=214510&action=review


r=me

> LayoutTests/inspector-protocol/dom/highlight-flow-with-no-region.html:19
> +	   if (msg.error) {
> +	       InspectorTest.log(msg.error.message);
> +	       InspectorTest.completeTest();
> +	       return;
> +	   }

I created a helper for this in
LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js named
InspectorTest.checkForError:

    InspectorTest.checkForError = function(responseObject)
    {
	if (responseObject.error) {
	    InspectorTest.log("PROTOCOL ERROR: " +
responseObject.error.message);
	    InspectorTest.completeTest();
	    throw "PROTOCOL ERROR";
	}
    }

So instead of these if blocks you can just do:

    InspectorTest.checkForError(msg);


More information about the webkit-reviews mailing list