Closed Bug 1156662 Opened 9 years ago Closed 9 years ago

Identical code for different branches in nsStructuredCloneContainer.cpp

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: Sylvestre, Assigned: Sylvestre)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: [CID 1295227])

Attachments

(1 file, 1 obsolete file)

Bug 1154366 updated some of the code of nsStructuredCloneContainer.cpp

Now, we have same code in 
nsresult nsStructuredCloneContainer::InitFromJSVal
cid 1295227
Attached patch bug-1156662.diff (obsolete) — Splinter Review
I know that you don't do review but it landed recently and it landed in m-b.
(I wonder if it does not hide something).
Attachment #8595199 - Flags: review?(bzbarsky)
Comment on attachment 8595199 [details] [diff] [review]
bug-1156662.diff

Oh, oops.  Yeah, this branching can totally go away.

No need for that temporary false either.  Just do:

   bool success = JS_WriteStructuredClone(aCx, aData, &jsBytes, &mSize,
                                          nullptr, nullptr,
                                          JS::UndefinedHandleValue);
Attachment #8595199 - Flags: review?(bzbarsky) → review+
Attached patch 240214.diffSplinter Review
here it is, thanks
Attachment #8595435 - Flags: review+
Keywords: checkin-needed
Attachment #8595199 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/b9a594d013bd
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: