Commit Graph

11877 Commits

Author SHA1 Message Date
Blake Kaplan
d4014d272a Add a test for bug 604087. r=gal 2010-10-13 16:54:13 -07:00
Jason Orendorff
fd0c6b2d5c Bug 604087 - Minor tweaks to JS_TransplantWrapper and JSAutoEnterCompartment. r=mrbkap 2010-10-13 17:26:40 -07:00
Blake Kaplan
355a7fed18 Bug 604087 - Deal with GC happening during JS_TransplantWrappers. r=jst/gal 2010-10-13 17:21:00 -07:00
Nicholas Nethercote
1c23e0dd04 Bug 603825 - Fix a bunch of warnings. r=jwalden. 2010-10-13 16:49:53 -07:00
Nicholas Nethercote
ddd0fb50cd Bug 600779 - TM: allow for branches that are always taken. r=dmandelin. 2010-10-13 16:39:20 -07:00
Brian Hackett
78a4b0dad2 Fix memory leak, change uint to unsigned, bug 584917 followup. r=brendan,njn 2010-10-13 16:10:15 -07:00
Brian Hackett
869a6640ac Fix use of uninitialized variable, bug 584917 followup. r=mrbkap 2010-10-13 15:41:53 -07:00
Brian Hackett
f9cf7a5b7d Flexible length JSObject, bug 584917. r=brendan,igor 2010-10-13 11:49:22 -07:00
Blake Kaplan
fd87098d25 Bug 603845 - Protect ourselves against compartments that have null principals. r=gal 2010-10-13 11:37:25 -07:00
Blake Kaplan
49a6e89f74 Bug 604108 - Grab the right compartment to check if we're finalizing the functionNamespaceObject. r=peterv 2010-10-13 11:17:21 -07:00
Johnny Stenback
78e3992901 Merge backout. 2010-10-13 11:18:00 -07:00
Johnny Stenback
33d1b6d31f Backed out changeset 08970767d83d per request from sayrer due to a trace malloc alloc regression. 2010-10-13 11:17:51 -07:00
Johnny Stenback
323f4a2a01 Merge backout. 2010-10-13 11:17:22 -07:00
Johnny Stenback
8bf4363aa7 Backed out changeset ad0c80eacba7 per request from sayrer due to a trace malloc alloc regression. 2010-10-13 11:17:13 -07:00
Johnny Stenback
886679794e Merge backout. 2010-10-13 11:16:38 -07:00
Johnny Stenback
76bb5be13d Backed out changeset a63b6fa0229c per request from sayrer due to a trace malloc alloc regression. 2010-10-13 11:16:20 -07:00
Sean Stangl
d5c09a23f0 Fix typo in ensureTypeSynced(), fixing assert. b=598839. 2010-10-12 20:34:15 -04:00
Sean Stangl
357a3ae283 Eliminate ImmutableSync on x64. b=601066, r=dvander. 2010-10-12 20:08:40 -04:00
Sean Stangl
d96bb05817 Faster x64 Syncing. b=598839, r=dvander. 2010-10-12 17:39:30 -04:00
Luke Wagner
844de3126b Bug 603017 - speed up js::DefaultValue on String builtin with void hint (r=brendan) 2010-10-12 13:41:40 -07:00
Gregor Wagner
34dd1159af Bug 603433 - TM: various GC cleanups, r=igor 2010-10-13 09:22:05 -07:00
David Mandelin
e45bcfe30a Bug 603558: add -m option to turn on method jit for xpcshell, r=dvander, a=shaver
--HG--
extra : rebase_source : 9374b3ab212fa8cd41d33b3887e678b9888be972
2010-10-12 17:25:37 -07:00
Blake Kaplan
7c9de80f1f Revert unintended changes. 2010-10-12 17:44:34 -07:00
Blake Kaplan
03450c5470 Bug 603816 - Don't assume that target->data is non-null. r=peterv
--HG--
extra : rebase_source : 6a3e949376465cc9eac3d4ffa6b7fc3ba501c502
2010-10-12 16:28:22 -07:00
Nicholas Nethercote
39f5c14292 Update nanojit-import-rev stamp. 2010-10-12 12:53:29 -07:00
Peter Van der Beken
ac7fa9fd75 Fix for bug 603677 (Crash on startup due to GetProto on an XPCWrappedNative being null with Bugzilla Tweaks jetpack installed), compartments followup. r=mrbkap.
--HG--
extra : rebase_source : 884494ce295e8e2222de4f3bafb02d4a96e2bcc2
2010-10-12 11:51:42 -07:00
Nicholas Nethercote
4b1f77accc These tests should have been added as part of the patch for bug 595728.
--HG--
extra : convert_revision : f31ee612d65e224424ae24d1852491c1b1698388
2010-10-07 23:14:10 -07:00
Nicholas Nethercote
6cc88ddd4f Bug 599247 - nanojit: in Nativei386.cpp, generate d[b + i<<s] addressing modes in asm_store32(). r=edwsmith.
--HG--
extra : convert_revision : cf8d0148a91da8795edec935ddec57d4164bc3aa
2010-10-07 20:24:07 -07:00
Rick Reitmaier
0380f837dc fix build breakage
--HG--
extra : convert_revision : c900245f6488bbcca67f1b2136c4f30427a789aa
2010-10-07 19:35:06 -07:00
Rick Reitmaier
e4543e5e2e Bug 596056 - nanojit: random number generator needed for many hardening algorithms (r+nnethercote,edwsmith)
introduce noise object

Assembler to use a noise object in which the actual mechanics of how noise is
being produced in abstracted by the client.

The noise object will often need to contain state so its convenient to derive
from this class and build an object containing all the necessary state.

--HG--
extra : convert_revision : c569f3ddd2d9b7a69b3c63f1fd139ea8d513fd9c
2010-10-07 19:22:35 -07:00
Nicholas Nethercote
02b6b47148 Bug 602408 - nanojit: print all hex numbers in LIR dumps with an 0x prefix. r=rreitmai.
--HG--
extra : convert_revision : 819b3d7e0ab682bf76da6c24de58434f5744e640
2010-10-07 15:30:36 -07:00
Jason Orendorff
41c66a3760 Fix anyname_finalize to look in the right compartment, to avoid dangling pointer. Likely fix for bug 603270. r=mrbkap over IRC.
--HG--
extra : rebase_source : 234c1412ce5543e32222cfd292ee905634ef6741
2010-10-12 14:40:05 -05:00
Jim Blandy
713b25831a Bug 601168: Allow nsHTMLPluginObjElementSH::Call to pass through non-Object |this| values to the plugin. r=bz,gal
This introduces some new JSAPI C++ entry points, one of which allows
arbitrary jsvals to be passed as the |this| value to a call; this means we
avoid a JSVAL_TO_OBJECT call in the caller, and its corresponding
OBJECT_TO_JSVAL call in the callee.
2010-10-12 11:50:03 -07:00
Jim Blandy
d195d41b0a Bug 514570: Adapt XPConnect to new JS_GetFrameThis arguments. r=jorendorff
It used to be:
JSObject *JS_GetFrameThis(JSContext *, JSStackFrame *);

Now it is:
JSBool JS_GetFrameThis(JSContext *, JSStackFrame *, jsval *);

(In strict mode code, |this| values that are primitives don't get wrapped.)
2010-10-12 11:50:03 -07:00
Jim Blandy
112fe57db0 Bug 514570: Adapt jsd to new JS_GetFrameThis arguments. r=brendan
It used to be:
JSObject *JS_GetFrameThis(JSContext *, JSStackFrame *);

Now it is:
JSBool JS_GetFrameThis(JSContext *, JSStackFrame *, jsval *);

(In strict mode code, |this| values that are primitives don't get wrapped.)
2010-10-12 11:50:03 -07:00
Jeff Walden
0b9b58415c Bug 575522 - Object.prototype.toString should return "[object Undefined]" and "[object Null]" when called with |this === undefined| or |this === null|, respectively. r=jorendorff,brendan 2010-10-12 11:50:03 -07:00
Jeff Walden
4626f47ec6 Bug 514570 - 3 - Don't box |this| for strict mode functions. r=jorendorff 2010-10-12 11:50:03 -07:00
Jeff Walden
7f75fc0a25 Bug 514570 - 2 - Push |undefined| rather than |null| when calling functions without a specified |this| value, per ES5. r=jorendorff 2010-10-12 11:50:03 -07:00
Jeff Walden
fcbd8eb10b Bug 514570 - 1 - Convert primitive-this-of-type function flags into a single primitive-this flag, to pave way for strict mode unadulterated-this passing. r=jorendorff 2010-10-12 11:50:02 -07:00
Brendan Eich
eb3502680f JSOPTION_ANONFUNFIX should be set in js shell (5595555, r=cdleary). 2010-10-06 14:58:28 -07:00
Ginn Chen
b1fc7ea706 Bug 601835 Add JS_STATIC_ASSERT back for Solaris Studio, r=brendan 2010-10-11 18:23:55 +08:00
Brendan Eich
ab966b3529 Warning fixes (one left over from 602621, the other from 584789). 2010-10-10 21:11:45 -07:00
Johnny Stenback
18174c5a4e Bug 580128 - No need to assert about commpartment mismatches in JS_Get/SetPrivate (r=gal). 2010-10-10 15:50:11 -07:00
Blake Kaplan
05061dd1c1 Bug 580128 - Deal with the outer object hook failing a little more gracefully. r=jst 2010-10-10 15:49:51 -07:00
Peter Van der Beken
645d07dc67 Bug 580128. Remove cross origin string wrappers from hash when the wrapped string dies. r=mrbkap.
As a note: this bug took peterv and mrbkap 7 hours to track down using replay debugging after spending hours trying to even catch it on a replay debugging box.
2010-10-10 15:49:38 -07:00
Blake Kaplan
0228224cd3 bug 580128 - Allow chrome://global/ scripts to unwrap SOWs going into C++. r=peterv/jst 2010-10-10 15:49:30 -07:00
Andreas Gal
20ff9fd18f bug 580128 - split expando properties onto a separate object and implement enumeration. r=mrbkap 2010-10-10 15:49:13 -07:00
Blake Kaplan
acf7a3ad20 bug 580128 - By default properties created by property assignment are enumerable. r=gal 2010-10-10 15:49:08 -07:00
Blake Kaplan
9eac8b4de5 bug 580128 - Create SOWs same and cross compartment. r=jst 2010-10-10 15:48:55 -07:00
Johnny Stenback
dd9636fcf2 bug 580128 - Allow unwrapping windows via JSObject::unwrap. r=jst 2010-10-10 15:48:35 -07:00
Andreas Gal
9103300871 bug 580128 - Implement deep wrapping for .wrappedJSObject. r=mrbkap 2010-10-10 15:48:29 -07:00
Blake Kaplan
b8df1d75e7 bug 580128 - Outerize inner windows. r=jst 2010-10-10 15:47:55 -07:00
Blake Kaplan
d1776a6e22 bug 580128 - Reparent proxies when we pull them out of the map in order to try to keep their parents sembling something current. r=jst 2010-10-10 15:47:48 -07:00
Andreas Gal
5724ba40ea bug 580128 - Cross origin wrapper needs no waive xray flag. r=mrbkap 2010-10-10 15:47:22 -07:00
Peter Van der Beken
cc3214ae02 bug 580128 - Don't create slim wrappers when crossing compartments. r=mrbkap 2010-10-10 15:47:19 -07:00
Peter Van der Beken
9ba94d50b4 bug 580128 - Don't create multiple wrappers for global objects (like BackstagePass). r=mrbkap 2010-10-10 15:47:16 -07:00
David Anderson
c190047dbc Fix bug 602574 - Assertion failure: constOffset != 0 in JSScript::NewScript() on 64-bit platforms. r=gal@uci.edu 2010-10-10 15:47:09 -07:00
Blake Kaplan
e4cff70d45 bug 580128 - Revert bogus change to which scope we use in nsXPCWrappedJSClass::CallMethod. r=jst Many thanks to Margaret and sdwilsh who helped track this one down. 2010-10-10 15:46:59 -07:00
Peter Van der Beken
dba11b628d Bug 580128. Remove XrayUtils::JSSLOT_PROXY_OBJ to fix leaks. r=mrbkap. 2010-10-10 15:46:45 -07:00
Peter Van der Beken
629ea4ef17 bug 580128 - Fix js_PrintObjectSlotName. r=mrbkap 2010-10-10 15:46:42 -07:00
Peter Van der Beken
579942e2b6 bug 580128 - Initialize vp before calling property op in JSProxyHandler::get. r=mrbkap 2010-10-10 15:46:34 -07:00
Peter Van der Beken
a4014cdf86 Bug 580128 - Fix NativeWrapper(window).document. r=mrbkap 2010-10-10 15:46:26 -07:00
Andreas Gal
695053b449 bug 580128 - Fix compartment bugs in XrayWrapper. r=mrbkap 2010-10-10 15:46:23 -07:00
Johnny Stenback
69b6a88894 Bug 580128. Reset gczeal after test completes. r=gal@uci.edu 2010-10-10 15:46:20 -07:00
Johnny Stenback
1cb512cddb Bug 580128. Properly switch compartments and wrap values when running xpcshell tests. r=mrbkap@gmail.com 2010-10-10 15:46:16 -07:00
Johnny Stenback
e08bf405b4 Bug 580128. Disable test that is not ready for the new wrappers yet. r=mrbkap@gmail.com 2010-10-10 15:46:13 -07:00
Peter Van der Beken
993f7e96bf bug 580128 - Fix evalInSandbox. r=mrbkap 2010-10-10 15:46:07 -07:00
Andreas Gal
2975066de7 bug 580128 - Make e4x anyname etc be per compartment, not in the default compartment. r=mrbkap 2010-10-10 15:46:05 -07:00
Andreas Gal
4467b41169 bug 580128 - Remove test that no longer works right. r=mrbkap 2010-10-10 15:43:06 -07:00
Johnny Stenback
1ca1b04765 bug 580128 - Move test that tests for existence of XrayWrapper's into chrome, and fix lookupMethod bug that was triggered by the test move. r=mrbkap
--HG--
rename : js/src/xpconnect/tests/mochitest/test_bug517163.html => js/src/xpconnect/tests/chrome/test_bug517163.xul
2010-10-10 15:42:45 -07:00
Blake Kaplan
8970b90a14 bug 580128 - Attempt to fix file:// URIs all ending up in the same compartment. r=peterv 2010-10-10 15:42:36 -07:00
Blake Kaplan
fbd8321aa9 bug 580128 - Make document.domain affect how we look up properties in addition to the security check. r=gal 2010-10-10 15:42:21 -07:00
Blake Kaplan
4982e8d388 bug 580128 - Distinguish between XOW XrayWrappers and XPCNW XrayWrappers and use the new knowledge in a few places. r=gal 2010-10-10 15:42:18 -07:00
Blake Kaplan
e5f38fdf0b bug 580128 - Use scopes when we have them to wrap into the right scopes. r=peterv 2010-10-10 15:42:12 -07:00
Johnny Stenback
fd0ffcbc96 bug 580128 - Fix getting doubled wrapped objects in XPConnect. r=mrbkap 2010-10-10 15:42:04 -07:00
Andreas Gal
ab068cae64 bug 580128 - Remove test that uses an obsolete wrapper. r=mrbkap 2010-10-10 15:42:01 -07:00
Jason Orendorff
73fb2b5453 Mainly just fix ExposedPropertiesOnly::check to ignore non-enumerable properties and return true when no property is found. r=mrbkap 2010-10-10 15:41:56 -07:00
Peter Van der Beken
6594bfed65 bug 580128 - Remove old wrappers. r=mrbkap 2010-10-10 15:41:40 -07:00
Blake Kaplan
0b6ae7d569 bug 580128 - Fix evalInSandbox returning objects in the wrong compartment. r=jst 2010-10-10 15:41:33 -07:00
Andreas Gal
3139de18ef bug 580128 - Try to allow UniversalXPConnect to have full access through "XOWs". 2010-10-10 15:41:24 -07:00
Andreas Gal
fe1f79bea1 bug 580128 - Don't think the outer window isn't "native". r=mrbkap 2010-10-10 15:41:20 -07:00
Andreas Gal
1148b3e425 Bug 580128. Update mochi tests to the new wrappers. r=mrbkap@gmail.com 2010-10-10 15:41:14 -07:00
Andreas Gal
4727d8eb7b bug 580128 - Fix compartment mistakes around document.domain stuff. r=mrbkap 2010-10-10 15:39:29 -07:00
Andreas Gal
1d93b82d53 bug 580128 - Allow proxies to answer the "hasInstance" question. r=mrbkap 2010-10-10 15:39:26 -07:00
Peter Van der Beken
9779e115ec bug 580128 - Allow NewResolve to set properties on wrappers. r=gal 2010-10-10 15:39:23 -07:00
Andreas Gal
133adc68a7 bug 580128 - Allow access when both sites have set document.domain. r=mrbkap 2010-10-10 15:39:19 -07:00
Johnny Stenback
c74184af3e Bug 580128. Use JS_WrapObject() in xpcJSWeakReference::Get() since it's the right API to use here. r=mrbkap@gmail.com 2010-10-10 15:39:17 -07:00
Andreas Gal
ff566b632b Bug 580128. Don't let script access only wrappers be passed to C++ code. r=peterv@propagandism.org 2010-10-10 15:39:08 -07:00
Andreas Gal
bce6505f32 bug 580128 - Fix wrapping of jsval parameters. r=peterv 2010-10-10 15:39:04 -07:00
Peter Van der Beken
b7e152241c Bug 580128 - Fix XPCVariant::VariantDataToJS to properly rewrap, r=gal. 2010-10-10 15:39:02 -07:00
Blake Kaplan
bba79011e0 bug 580128 - Make the XPCNativeWrapper constructor work to actually construct XrayWrappers. r=jst 2010-10-10 15:38:56 -07:00
Blake Kaplan
eed8d1aacc bug 580128 - Deal better with compartments around the xray holder object. r=gal 2010-10-10 15:38:39 -07:00
Blake Kaplan
e05232ec8b bug 580128 - Try to make test_wrappers-2.xul work a little better.
--HG--
rename : js/src/xpconnect/tests/chrome/file_wrappers-2.html => js/src/xpconnect/tests/mochitest/file_wrappers-2.html
2010-10-10 15:38:24 -07:00
Andreas Gal
b656a2c951 Bug 580128. Add more asserts to the interpreter to check that we're on the right compartment. r=mrbkap@gmail.com 2010-10-10 15:38:13 -07:00
Blake Kaplan
1b571f0ac4 bug 580128 - Attempt to make the XPCNativeWrapper constructor create XrayWrappers. r=jst 2010-10-10 15:37:44 -07:00
Johnny Stenback
41120f4b7c Bug 580128. Fix various mochi chrome tests to work with the new wrappers. r=mrbkap@gmail.com 2010-10-10 15:37:28 -07:00
David Mandelin
3024f662e3 Bug 602003: add jsd API to query valid script begin and end PCs, r=sayrer,jjb 2010-10-06 11:23:14 -07:00
Jason Orendorff
a214519d8f Bug 592664, Epilogue: caching eval scripts that we will never use again is necessary to avoid leaking them. rs=Waldo. (Note that my 4 previous commits today were all for bug 592664, not "592644" as the commit messages say.)
--HG--
extra : rebase_source : e7337a31313a4ef3d2d676be41291c832afa4c15
2010-10-07 19:15:45 -05:00
David Mandelin
50f3df9d0e Backed out changeset af020f2b9293 due to x64 build bustage. 2010-10-07 17:03:01 -07:00
David Mandelin
544d2fb3f2 Bug 602003: add jsd API to query valid script begin and end PCs, r=sayrer,jjb 2010-10-06 11:23:14 -07:00