Closed Bug 196683 Opened 21 years ago Closed 21 years ago

Remove infinite recursion loop check in XPC_WN_Helper_NewResolve

Categories

(Core :: XPConnect, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla1.4beta

People

(Reporter: dbradley, Assigned: dbradley)

References

Details

(Keywords: perf)

Attachments

(1 file, 1 obsolete file)

The check at
http://lxr.mozilla.org/mozilla/source/js/src/xpconnect/src/xpcwrappednativejsops.cpp#911
is no longer needs. The JS engine avoids this.
Summary: Rmove infinite recursion loop check in XPC_WN_Helper_NewResolve → Remove infinite recursion loop check in XPC_WN_Helper_NewResolve
Attached patch Removes the recursion check (obsolete) — Splinter Review
This removes the recursion checks.
To 1.5
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla1.5alpha
Comment on attachment 120570 [details] [diff] [review]
Removes the recursion check

r=brendan@mozilla.org

/be
Attachment #120570 - Flags: review+
Comment on attachment 120570 [details] [diff] [review]
Removes the recursion check

Looking for an sr, will try and get this into 1.4b since have a patch and an
r=, and have a little time left before the freeze
Attachment #120570 - Flags: superreview?(jst)
Target Milestone: mozilla1.5alpha → mozilla1.4beta
Comment on attachment 120570 [details] [diff] [review]
Removes the recursion check

sr=jst
Attachment #120570 - Flags: superreview?(jst) → superreview+
I was a little over eager on removing some of the recursion checks. The one in
XPC_WN_OnlyIWrite_PropertyStub is not only a recursion check, but a check for
being called from the resolve callbacks. In that situation it allows the
addition of the property by XPConnect, but prevents others.

So, the patch is similar, unfortunately doesn't remove as much code as before.
Attachment #120570 - Attachment is obsolete: true
Attachment #120881 - Flags: superreview?(jst)
Attachment #120881 - Flags: review?(brendan)
Comment on attachment 120881 [details] [diff] [review]
Revised, only removes the check for resolve callbacks only

sr=jst
Attachment #120881 - Flags: superreview?(jst) → superreview+
Comment on attachment 120881 [details] [diff] [review]
Revised, only removes the check for resolve callbacks only

r=brendan@mozilla.org -- can you enlighten me about where the get-property is
in an xpconnect resolve hook?

Also, please add diff -p to your .cvsrc file, it'll help label context hunks
with function or method names.

/be
Attachment #120881 - Flags: review?(brendan) → review+
Not sure if I understand what you are asking. A couple of get properties occur
when the XPCNativeMember's Resolve gets called via GetValue, and it creates a
new function, but nothing involving the currently resolving property. If a
scriptable helper is involved, then pretty much anything could happen.

The problem I was having in the first patch was that add-property hook was
getting called as a result of creating the property from within the resolve hook
via the XPConnect DefineProperty function.
Patch checked in
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Checking verified -
Status: RESOLVED → VERIFIED
*** Bug 80368 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: