Closed Bug 1294844 Opened 8 years ago Closed 8 years ago

groupOf shell function should use getGroup(cx)

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: spinda, Assigned: spinda)

Details

Attachments

(1 file, 2 obsolete files)

...to handle lazy groups properly.
Assignee: nobody → mismith
Status: NEW → ASSIGNED
Attachment #8780696 - Flags: review?(shu)
Comment on attachment 8780696 [details] [diff] [review] Bug 1294844: groupOf shell function should use getGroup(cx) Review of attachment 8780696 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/shell/js.cpp @@ +3119,5 @@ > JS_ReportError(cx, "groupOf: object expected"); > return false; > } > JSObject* obj = &args[0].toObject(); > + args.rval().set(JS_NumberValue(double(uintptr_t(obj->getGroup(cx)) >> 3))); Need to null-check the return value of getGroup(cx)
Attachment #8780696 - Flags: review?(shu) → review+
Comment on attachment 8780696 [details] [diff] [review] Bug 1294844: groupOf shell function should use getGroup(cx) Review of attachment 8780696 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jsobj.cpp @@ -3442,5 @@ > (void*) globalObj, globalObj->getClass()->name); > const Class* clasp = obj->getClass(); > fprintf(fp, "class %p %s\n", (const void*)clasp, clasp->name); > - const ObjectGroup* group = obj->group(); > - fprintf(fp, "group %p\n", (const void*)group); If you're so inclined, you could still print this if !hasLazyGroup(), and print something else if hasLazyGroup()
Like this?
Attachment #8780696 - Attachment is obsolete: true
Attachment #8780701 - Flags: review?(shu)
Attachment #8780701 - Attachment is obsolete: true
Attachment #8780701 - Flags: review?(shu)
I've incorporated both the null check and the hasLazyGroup check in dumpObject.
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/31530f6106bf groupOf shell function should use getGroup(cx) to handle lazy groups properly. r=shu
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: