Closed Bug 834106 Opened 7 years ago Closed 7 years ago

consolidate ClonedMessageData building code into MessageManagerCallback

Categories

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

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: froydnj, Assigned: froydnj)

Details

Attachments

(1 file)

A number of places build ClonedMessageData for sending in identical fashion.
There's no reason to have the code duplicated in all those places.
It seemed better to have DataBlobs confined to nsFrameMessageManager.cpp
than to stuff the DataBlobs bits into BlobTraits.  The latter would require
including DOMTypes.h into Blob.h and that seemed like a high price to pay
for one small thing.
Attachment #705692 - Flags: review?(bugs)
Comment on attachment 705692 [details] [diff] [review]
consolidate ClonedMessageData building code into MessageManagerCallback


>+  static InfallibleTArray<ProtocolType*>& blobs(ClonedMessageData& aData) {
s/blobs/Blobs/
and { should be in the next line.


>+  static InfallibleTArray<ProtocolType*>& blobs(ClonedMessageData& aData) {
ditto

>+  if (!BuildClonedMessageDataForParent(this, aData, data)) {
>+      return false;
2 spaces indentation, please.

>+  if (!BuildClonedMessageDataForChild(cc, aData, data)) {
>+      return false;
ditto

>+  if (!BuildClonedMessageDataForChild(cc, aData, data)) {
>+      return false;
And here
Attachment #705692 - Flags: review?(bugs) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/b162349ad538

I blame bogus emacs modelines for my indentation problems. :)
https://hg.mozilla.org/mozilla-central/rev/b162349ad538
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Assignee: nobody → nfroyd
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.