Closed Bug 508982 Opened 15 years ago Closed 15 years ago

XOWs call RewrapIfNeeded too many times

Categories

(Core :: XPConnect, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mrbkap, Assigned: mrbkap)

Details

Attachments

(1 file)

Currently, XPC_XOW_GetOrSetProperty has:

    if (!XPCWrapper::GetOrSetNativeProperty(cx, obj, wn, id, vp, isSet,
                                            JS_FALSE)) {
      return JS_FALSE;
    }

    return XPC_XOW_RewrapIfNeeded(cx, obj, vp);

but GetOrSetNativeProperty already calls RewrapIfNeeded (via XPCWrapper::RewrapIfDeepWrapper). In practice, this actually works because the return values look like they're properties that don't have associated wrapped natives and we simply return, but we're doing extra work that we shouldn't have to do. Patch in a jiffy!
Attached patch FixSplinter Review
Assignee: nobody → mrbkap
Status: NEW → ASSIGNED
Attachment #393141 - Flags: superreview?(jst)
Attachment #393141 - Flags: review?(jst)
Attachment #393141 - Flags: superreview?(jst)
Attachment #393141 - Flags: superreview+
Attachment #393141 - Flags: review?(jst)
Attachment #393141 - Flags: review+
http://hg.mozilla.org/mozilla-central/rev/3c54e89da87d
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: