Improving naming and comments in StructuredCloneHelper

RESOLVED FIXED in Firefox 44

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: baku, Assigned: baku)

Tracking

Trunk
mozilla44
Points:
---

Firefox Tracking Flags

(firefox44 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
sfink gave me extremely useful hints about naming and comments in StructuredCloneHelper.
(Assignee)

Comment 1

3 years ago
Created attachment 8667837 [details] [diff] [review]
renaming.patch
Attachment #8667837 - Flags: review?(bugs)

Comment 2

3 years ago
+  // 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.

Updated

3 years ago
Attachment #8667837 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/2f694f107db9
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox44: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.