Closed Bug 866575 Opened 11 years ago Closed 11 years ago

DOM-bindings crash with large source in createPattern

Categories

(Core :: Graphics: Canvas2D, defect)

23 Branch
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla23
Tracking Status
firefox22 --- unaffected
firefox23 + fixed

People

(Reporter: jruderman, Assigned: dzbarsky)

References

Details

(Keywords: crash, regression, testcase)

Crash Data

Attachments

(3 files)

Assertion failure: value, at dist/include/mozilla/dom/BindingUtils.h:557

Or null deref [@ mozilla::dom::WrapNewBindingObjectHelper<nsRefPtr<mozilla::dom::CanvasPattern>, true>::Wrap(JSContext*, JS::Handle<JSObject*>, nsRefPtr<mozilla::dom::CanvasPattern> const&, JS::Value*)]
When createPattern fails, is it supposed to throw or return null?
On Windows: bp-65ab709e-f98d-45f2-a050-cd5052130429.

It's likely a regression from bug 856472.
Crash Signature: [@ mozilla::dom::WrapNewBindingObjectHelper<nsRefPtr<mozilla::dom::CanvasPattern>, true>::Wrap(JSContext*, JS::Handle<JSObject*>, nsRefPtr<mozilla::dom::CanvasPattern> const&, JS::Value*)] → [@ mozilla::dom::WrapNewBindingObjectHelper<nsRefPtr<mozilla::dom::CanvasPattern>, true>::Wrap(JSContext*, JS::Handle<JSObject*>, nsRefPtr<mozilla::dom::CanvasPattern> const&, JS::Value*)] [@ mozilla::dom::WrapNewBindingObjectHelper<nsRefPtr<mozilla::dom…
Keywords: regression
OS: Mac OS X → All
Hardware: x86_64 → All
Version: Trunk → 23 Branch
The bug is at https://mxr.mozilla.org/mozilla-central/source/content/canvas/src/CanvasRenderingContext2D.cpp#1453

This should throw or we should change the webidl to return a nullable CanvasPattern.
Crash Signature: , JS::Value*)] [@ mozilla::dom::WrapNewBindingObjectHelper<nsRefPtr<mozilla::dom::ScriptProcessorNode>, int>::Wrap(JSContext*, JS::Handle<JSObject*>, nsRefPtr<mozilla::dom::ScriptProcessorNode> const&, JS::Value*) ] → , JS::Value*)] [@ mozilla::dom::WrapNewBindingObjectHelper<nsRefPtr<mozilla::dom::ScriptProcessorNode>, int>::Wrap(JSContext*, JS::Handle<JSObject*>, nsRefPtr<mozilla::dom::ScriptProcessorNode> const&, JS::Value*)]
Imo that method should throw.

David, want to do that and ask nrc or bas for review?
Attached patch Patch (deleted) — Splinter Review
Assignee: nobody → dzbarsky
Status: NEW → ASSIGNED
Attachment #743140 - Flags: review?(ncameron)
Comment on attachment 743140 [details] [diff] [review]
Patch

Review of attachment 743140 [details] [diff] [review]:
-----------------------------------------------------------------

lgtm
Attachment #743140 - Flags: review?(ncameron) → review+
Attached patch Fix linux failure (deleted) — Splinter Review
Attachment #744362 - Flags: review?(matt.woodrow)
Attachment #744362 - Flags: review?(matt.woodrow) → review+
https://hg.mozilla.org/mozilla-central/rev/1edc14e71167
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: