Closed Bug 1209919 Opened 5 years ago Closed 5 years ago

Improving naming and comments in StructuredCloneHelper

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: baku, Assigned: baku)

References

Details

Attachments

(1 file)

sfink gave me extremely useful hints about naming and comments in StructuredCloneHelper.
Attached patch renaming.patchSplinter Review
Attachment #8667837 - Flags: review?(bugs)
+  // Like Write() but it support the transferring of objects.
supports

+  // The parent object is set internally just during the Read(). This method
+  // can be used by custom read functions to retrieve it.
That sounds like the parent object has something to do with CustomReadHandler.
Could you perhaps drop 'custom' from the comment


// Implementations of the virtual methods to allow cloning of DOM data
Is a bit vague "DOM data". 
Perhaps something like
"Implementations of the virtual methods to allow cloning  of objects which JS engine itself doesn't clone."

+  // These 2 static methods are useful to read/write fully serializable objects.
+  // They can be used by custom StructuredCloneHolderBase classes to
+  // serialize standard objects such as ImageData, CryptoKey, RTCCertificate,
+  // etc."
Why the word "standard" there.


+  ContextSupport mSupportedContexts;
I would probably call it mSupportedContext (without the 's'), but either way.
Attachment #8667837 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/2f694f107db9
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.