Commit Graph

3547 Commits

Author SHA1 Message Date
Bobby Holley
749c042230 Bug 1006629 - Remove unused mFlattenedJSObject from XPCCallContext. r=gabor 2014-05-06 23:17:45 -07:00
Bobby Holley
d0fda7850b Bug 1006629 - Remove GetCalleeWrapper. r=gabor 2014-05-06 23:17:44 -07:00
Bobby Holley
e6bf081ec6 Bug 1001198 - Stop getting XPConnect as a service during Sandbox creation. r=gabor
This causes problems when we try to create a Sandbox during XPConnect
initialization. Luckily, we don't need it at all.
2014-05-06 23:17:44 -07:00
Bobby Holley
97779f0a27 Bug 1001198 - Explicitly create the SafeJSContext from XPConnect. r=gabor 2014-05-06 23:17:44 -07:00
Bobby Holley
44d3ac9bf4 Bug 1001198 - Remove useless (and footgun) XPCWrappedNativeScope::InitStatics. r=gabor
All this does is null out some stuff that's already in the BSS. And it causes
leaks if we create a global before it's called, which the upcoming patch does.
2014-05-06 23:17:44 -07:00
Bobby Holley
9f78de5d77 Bug 1001198 - Remove the call to InitClasses for the SafeJSContextGlobal. r=gabor
In contrast to InitClassesWithNewWrappedGlobal, InitClasses doesn't do much
these days. It pretty much only exists to support JSD globals that are created
without XPConnect's knowledge, and then are suddenly handed to XPConnect.

It really only has two observable effects. The first is ensuring the existence
of an XPCWrappedNativeScope, which we know we have here, because we went through
xpc::CreateGlobalObject. The second is to set up the XPCNativeWrapper
constructor (eww), which definitely doesn't matter here, especially now that
we're asserting that we never run script in this global.
2014-05-06 23:17:44 -07:00
Bobby Holley
4c5f7a4d5b Bug 1001198 - Stop firing onNewGlobalObject for the SafeJSContext global. r=gabor 2014-05-06 23:17:43 -07:00
Bobby Holley
2513cf740a Bug 1001198 - Explicitly fire up the SSM from nsXPConnect. r=gabor 2014-05-06 23:17:43 -07:00
Andrew McCreight
0b5a958dcb Bug 1004017 - Rename CycleCollectedJSRuntime::NeedCollect() and Collect(). r=smaug 2014-05-06 17:25:26 -07:00
Andrew McCreight
b89c24ee20 Bug 958353 - Add finishCC() and ccSlice() methods for testing incremental cycle collection. r=smaug 2014-05-06 17:25:26 -07:00
Bobby Holley
8ba3be8772 Bug 997987 - Cache the system principal on nsContentUtils and remove nsIScriptSecurityManager::SubjectPrincipalIsSystem. r=Ms2ger,sr=bz 2014-05-06 15:43:03 -07:00
Bobby Holley
9c988d6c40 Bug 997987 - Remove nsIScriptSecurityManager::GetCxSubjectPrincipal. r=Ms2ger 2014-05-06 15:43:02 -07:00
Ehsan Akhgari
3a59a5ce49 Bug 1005706 - Remove the manual install rules from js/xpconnect/tests/components/js/Makefile.in; r=mshal 2014-05-05 21:28:10 -04:00
Alexandre Poirot
d975eff099 Bug 961777 - Disable reuseGlobal on Mulet. r=bholley 2014-05-05 06:53:00 -04:00
Bobby Holley
6362d89759 Bug 1005806 - HTMLInputElement.controllers should be [ChromeOnly]. r=bz 2014-05-05 10:49:24 -07:00
Bobby Holley
1686fcd58d Bug 999297 - Simplify xpc::HasInstance. r=bz 2014-05-01 11:03:11 -07:00
Bobby Holley
8ad042014e Bug 999297 - Implement xpc::UnwrapReflectorToISupports. r=bz
I kind of thought we already had something like this, but I couldn't find
anything.
2014-05-01 11:03:11 -07:00
Bobby Holley
2645da308a Bug 1004295 - Hard abort if we try to unload modules when loader global reuse is enabled. r=mccr8 2014-05-01 11:02:59 -07:00
Nathan Froyd
0d23973e46 Bug 1003309 - remove JS component loader construction from mozJSSubScriptLoader; r=bholley 2014-04-29 13:28:23 -04:00
Jon Coppeard
1216544376 Bug 959787 - Handlify remaining JS APIs r=terrence r=bz r=bholley 2014-04-30 10:10:33 +01:00
Nicholas Nethercote
1c0602e423 Bug 952650 (part 16) - Remove JSVAL_TO_PRIVATE. r=till.
--HG--
extra : rebase_source : 603bb66a90484b488bedf1dd4da6935324c148c6
2014-04-28 16:01:31 -07:00
Nicholas Nethercote
049829fa60 Bug 952650 (part 14) - Remove JSVAL_IS_GCTHING. r=till.
--HG--
extra : rebase_source : 469430d481f5fdb14d49609d8460f9fcbc90927f
2014-04-28 16:01:30 -07:00
Nicholas Nethercote
1c5751ac95 Bug 952650 (part 13) - Remove JSVAL_IS_PRIMITIVE. r=till.
--HG--
extra : rebase_source : 450ba0261ef5a8546c81f9f645605e312585d6c6
2014-04-27 20:27:54 -07:00
Nicholas Nethercote
530542eecd Bug 952650 (part 12) - Remove JSVAL_TO_OBJECT. r=till.
--HG--
extra : rebase_source : 60dcaa2b778d3cf6eb7dc1a4949aab010ed8c130
2014-04-27 19:58:52 -07:00
Rodrigo Rodriguez Jr.
3a5329b969 Bug 952650 (part 11) - Remove JSVAL_TO_INT. r=njn.
--HG--
extra : rebase_source : 41923458bbf8fd957c9a57685df4969f1190bd9f
2014-04-27 19:55:08 -07:00
Rodrigo Rodriguez Jr.
75b31bf370 Bug 952650 (part 10) - Remove JSVAL_IS_NUMBER. r=njn.
--HG--
extra : rebase_source : eaef4276d665c9bb06eb695989fb4c3b08358069
2014-04-27 19:48:45 -07:00
Rodrigo Rodriguez Jr.
9a92d22f5a Bug 952650 (part 9) - Remove JSVAL_IS_INT. r=njn.
--HG--
extra : rebase_source : dc0c170914c2370c218cdbbe671d2a68628f5a87
2014-04-27 19:47:02 -07:00
Rodrigo Rodriguez Jr.
e987aa99bf Bug 952650 (part 8) - Remove JSVAL_TO_STRING. r=njn.
--HG--
extra : rebase_source : 61ab9459c00849027498904863647e65453a1a43
2014-04-27 19:45:46 -07:00
Rodrigo Rodriguez Jr.
d65b5ba4e5 Bug 952650 (part 6) - Remove JSVAL_IS_STRING. r=njn.
--HG--
extra : rebase_source : ebd55749447f9feea04a78ff7cc17ba2dd2c5cd0
2014-04-27 19:41:01 -07:00
Rodrigo Rodriguez Jr.
017da05366 Bug 952650 (part 5) - Remove JSVAL_TO_DOUBLE. r=njn.
--HG--
extra : rebase_source : b1d9ba218fd1126f486f686ec5754dfaedac8b3c
2014-04-27 19:38:31 -07:00
Rodrigo Rodriguez Jr.
350562fe28 Bug 952650 (part 4) - Remove JSVAL_IS_DOUBLE. r=njn.
--HG--
extra : rebase_source : 3c7065d9e487db70a1afed0a4143ae7b0cd23af9
2014-04-27 19:35:40 -07:00
Rodrigo Rodriguez Jr.
281223c92e Bug 952650 (part 2) - Remove JSVAL_IS_VOID. r=evilpies.
--HG--
extra : rebase_source : 0ae81cd69dc13d944927de906abc656536b4d425
2014-04-27 19:32:05 -07:00
Rodrigo Rodriguez Jr.
d3fe3aaf5d Bug 952650 (part 1) - Remove JSVAL_IS_NULL. r=terrence.
--HG--
extra : rebase_source : 83d1cdaf71260fd99b688c23303ceb2de7b00031
2014-04-27 19:30:51 -07:00
Michael Shuen
e76fd87034 Bug 972385 - Make JS::AutoValueVector subscript operator return handles. r=jonco, smaug 2014-04-28 16:53:00 +02:00
Ehsan Akhgari
83df766a59 Bug 1002313 - Fix the test for bug 503926 so that it doesn't rely on nsIDOMNode being scriptable; r=bzbarsky 2014-04-28 19:58:34 -04:00
Birunthan Mohanathas
5f1fde8824 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
Birunthan Mohanathas
5c3bda3eb3 Bug 866289 - Make mode lines consistent in js/xpconnect/ for 2 space indented files. r=Ms2ger 2014-04-03 07:58:00 -04:00
Birunthan Mohanathas
c48b86b0c6 Bug 866289 - Make mode lines consistent in js/xpconnect/ for 4 space indented files. r=Ms2ger 2014-04-03 07:58:00 -04:00
Jason Orendorff
4740c9dea6 Bug 547140, part 4 - Remove flags argument from resolve hooks. r=Waldo. 2014-04-25 16:11:02 -05:00
Jason Orendorff
6e21c723d2 Bug 547140, part 2 - Remove flags argument from JS_GetPropertyDescriptor and friends. r=Waldo. 2014-04-25 16:11:01 -05:00
Jason Orendorff
e51a8c4a20 Bug 547140, part 1 - Remove JSRESOLVE_ASSIGNING. r=Waldo. 2014-04-25 16:11:00 -05:00
Jason Orendorff
f66a185e68 Bug 987007, part 2 - Handle assignment to named and indexed setters without using JSRESOLVE_ASSIGNING. r=bz, r=bholley.
--HG--
extra : rebase_source : a26eb85a086a18219a4d423cd7ad49a92cfd2584
2014-04-25 15:07:18 -05:00
Ben Kelly
382ac50423 Bug 987556 Part 11 Use allocated array version of ConvertToUTF16() in XPCJSRuntime. r=bz 2014-04-25 10:11:57 -04:00
Ben Kelly
53eaab4b39 Bug 987556 Part 10 Use JS::SourceBufferHolder in mozJSSubScriptLoader. r=bz 2014-04-25 10:11:57 -04:00
Jeremy Morton
311814b5b8 Bug 998291 - Allow for relatively-loaded modules to be loaded into a given scope. r=bsmedberg 2014-04-22 23:37:26 +01:00
Bobby Holley
07b9d1a1c4 Bug 1001094 - Give nsJSID classinfo. r=mrbkap 2014-04-24 13:23:27 -07:00
Ehsan Akhgari
7262b1ae70 Bug 998738 - Kill nsIDOMXPathNamespace (and window.XPathNamespace); r=smaug 2014-04-24 12:07:44 -04:00
Chris Peterson
166df78b9e Bug 999717 - Fix gcc -Wlogical-op warning in js. r=mrbkap 2014-04-22 14:42:27 -07:00
Bobby Holley
bef3900938 Bug 990353 - Make discardSource a Sandbox option and use it (even in Desktop) for the precompilation scope. r=luke 2014-04-22 14:08:29 -07:00
Bobby Holley
8c7cf2c1e6 Bug 990353 - Flip off source discarding for XPCShell. r=fabrice 2014-04-22 14:08:29 -07:00
Bobby Holley
8ae876fba5 Bug 990353 - Tests. r=bent 2014-04-22 14:08:28 -07:00
Bobby Holley
58c382e9e3 Bug 990353 - Give tests/chrome its own moz.build file, like tests/mochitest. r=mshal
We also add a mochitest.ini file, which will eventually be used for http-served
files that are associated with chrome mochitests.
2014-04-22 14:08:28 -07:00
Bobby Holley
e1d5378ac6 Bug 990353 - Flag for discarding where appropriate. r=bent 2014-04-22 14:08:28 -07:00
Bobby Holley
2a54864f28 Bug 990353 - Add a pref for system source discarding. r=bent 2014-04-22 14:08:28 -07:00
Bobby Holley
9766fa5987 Bug 990353 - Make the decision to discard source entirely per-global, rather than per-script. r=luke
This is effectively a policy decision based on the kind of code we expect to be
running somewhere. This is in contrast to lazy source, which is often a practical
per-script consideration of whether or not we can retrieve the source if requested.

More importantly, tracking this information on the global is much easier to
get right than tracking it on the script.
2014-04-22 14:08:27 -07:00
Bobby Holley
3b3a7fe701 Bug 993772 - Introduce a singleton compilation scope. r=mrbkap 2014-04-20 11:48:13 -07:00
Bobby Holley
598e9fa905 Bug 993772 - Stop serializing principals along with scripts. r=mrbkap
The principal of a script is determined by the compartment these days, so this
field is useless.
2014-04-20 11:48:13 -07:00
Bobby Holley
88cc67dc3b Bug 998083 - Introduce Cu.getObjectPrincipal and kill nsIScriptSecurityManager::GetObjectPrincipal. r=gabor 2014-04-19 10:39:59 -07:00
Phil Ringnalda
2cabee2858 Back out 8 changesets (bug 990353) for gaia-integration bustage
CLOSED TREE

Backed out changeset f6b3c03454a4 (bug 990353)
Backed out changeset 6e1f9b821ae0 (bug 990353)
Backed out changeset 2926ad6c594f (bug 990353)
Backed out changeset 74b75c155205 (bug 990353)
Backed out changeset 394e09fe2da2 (bug 990353)
Backed out changeset 0fdd36b19a51 (bug 990353)
Backed out changeset 0792729890cc (bug 990353)
Backed out changeset 487e6f72fcf7 (bug 990353)
2014-04-19 08:37:32 -07:00
Bobby Holley
3b6343b213 Bug 990353 - Followup bustage fix. r=me 2014-04-19 00:40:18 -07:00
Bobby Holley
168f933189 Bug 990353 - Flip off source discarding for XPCShell. r=fabrice 2014-04-18 23:46:27 -07:00
Bobby Holley
41d6ff319a Bug 990353 - Tests. r=bent 2014-04-18 23:46:27 -07:00
Bobby Holley
259afdd32f Bug 990353 - Give tests/chrome its own moz.build file, like tests/mochitest. r=mshal
We also add a mochitest.ini file, which will eventually be used for http-served
files that are associated with chrome mochitests.
2014-04-18 23:46:27 -07:00
Bobby Holley
861c2a9611 Bug 990353 - Flag for discarding where appropriate. r=bent 2014-04-18 23:46:27 -07:00
Bobby Holley
db5dd8dd81 Bug 990353 - Add a pref for system source discarding. r=bent 2014-04-18 23:46:26 -07:00
Bobby Holley
f8ee5952ab Bug 990353 - Make the decision to discard source entirely per-global, rather than per-script. r=luke
This is effectively a policy decision based on the kind of code we expect to be
running somewhere. This is in contrast to lazy source, which is often a practical
per-script consideration of whether or not we can retrieve the source if requested.

More importantly, tracking this information on the global is much easier to
get right than tracking it on the script.
2014-04-18 23:46:26 -07:00
Ryan VanderMeulen
05e02e5efd Merge inbound to m-c. 2014-04-18 22:00:13 -04:00
Terrence Cole
56f4a8bca3 Bug 807168 - Make JSTracer into a real C++ class and kill the macro accessors; r=jonco,mccr8
--HG--
rename : js/public/Tracer.h => js/public/TracingAPI.h
2014-04-11 15:19:05 -07:00
Fabrice Desré
b6c050f2c2 Bug 965970 - Add support to compile asm.js code at install/update time r=luke,bholley,marco 2014-04-17 22:03:03 -07:00
Jon Coppeard
b1182ccb9f Bug 996052 - Remove JSVAL_TRACE_KIND, JSVAL_IS_GCTHING and JSVAL_TO_GCTHING r=terrence 2014-04-17 09:36:32 +01:00
Bobby Holley
d1b0de8367 Bug 997527 - Remove debugging code from bug 960828. r=me a=me DONTBUILD 2014-04-16 18:33:10 -07:00
Gabor Krizsanits
b7b0c47e44 Bug 996069 - Part3: Stop inheriting nsEP when window.open is called. r=bz 2014-04-16 22:29:57 +02:00
Terrence Cole
581c606391 Bug 959787 - Handlify JS_DefineProperty; r=Waldo, r=bz
--HG--
extra : rebase_source : 87991ed47ed071550af4e4125eea54a66fdb0071
2014-01-21 18:11:17 -08:00
Shian-Yow Wu
0eb9c68561 Bug 945152 - Part 2: Report mapped array buffer statistics for about:memory. r=njn 2014-04-16 19:26:41 +08:00
Jon Coppeard
dae8d1e277 Bug 912581 - Make JS_Add*Root APIs take Heap<T> r=terrence r=bz r=bholley 2014-04-16 09:47:57 +01:00
Jon Coppeard
173bd25321 Bug 993413 - Remove use of JS_Add/Remove*Root in favour of JS::PersistentRooted where possible r=terrence r=bz r=bholley 2014-04-16 09:47:53 +01:00
Bobby Holley
61c191d83c Bug 993423 - Don't hoist <svg:use> content into the XBL scope. r=smaug 2014-04-14 20:38:54 -07:00
Bobby Holley
04b22e3936 Bug 989528 - Introduce AutoJSAPIWithErrorsReportedToWindow as a replacement for AutoPushJSContextForErrorReporting. r=bz 2014-04-14 20:26:59 -07:00
Luke Wagner
f4eff37974 Bug 980447 - Add persistenceType argument to nsIQuotaManager.clearStoragesForURI (r=janv)
--HG--
extra : rebase_source : 4d034bd92b099bd1385fc9e8a95fa959fc8e51e0
2014-04-14 15:48:49 -05:00
Bobby Holley
2f9b5a76a7 Bug 995123 - Associate sandboxPrototyped Sandboxes to their prototype Window, if it exists. r=bz 2014-04-14 08:56:38 -07:00
Ehsan Akhgari
3e0d5777b0 Bug 995754 - Remove nsIDOMToString; r=bzbarsky 2014-04-13 18:53:36 -04:00
Olli Pettay
9afb24a0a4 Bug 688580 - Run deferred scripts before DOMContentLoaded; r=hsivonen 2014-04-12 11:02:21 +02:00
Ms2ger
194571df1a Bug 983989 - Part c: Cleanup XPCConvert::NativeData2JS; r=bholley 2014-04-12 10:15:58 +02:00
Ms2ger
64d386e878 Bug 983989 - Part b: Simplify code flow in XPCConvert::NativeData2JS; <3,r=bholley 2014-04-12 10:15:57 +02:00
Ms2ger
d75ac3e9ac Bug 983989 - Part a: Reindent XPCConvert::NativeData2JS; r=bholley 2014-04-12 10:15:56 +02:00
Boris Zbarsky
438ebc3f4e Bug 995047. Change out stack/exception APIs to hand out AString instead of AUTF8String for filename/functionname, so we end up with fewer string conversions in practice. r=smaug 2014-04-11 22:20:40 -04:00
Ed Morley
440f3655df Backed out changeset 592e6de7211b (bug 983989) 2014-04-10 15:48:11 +01:00
Ed Morley
67d5d9d3d7 Backed out changeset 91885eced736 (bug 983989) 2014-04-10 15:48:08 +01:00
Ed Morley
34e35d1dc3 Backed out changeset 14ab9b8d15be (bug 983989) 2014-04-10 15:48:04 +01:00
Ms2ger
7ea041b438 Bug 983989 - Part c: Cleanup XPCConvert::NativeData2JS; r=bholley 2014-04-10 13:24:25 +02:00
Ms2ger
afba289569 Bug 983989 - Part b: Simplify code flow in XPCConvert::NativeData2JS; <3,r=bholley 2014-04-10 13:24:25 +02:00
Ms2ger
f33aa32d47 Bug 983989 - Part a: Reindent XPCConvert::NativeData2JS; r=bholley 2014-04-10 13:24:24 +02:00
Boris Zbarsky
7523e50082 Bug 993889 part 4. Remove the scope argument of xpc_FastGetCachedWrapper. r=bholley 2014-04-10 00:58:42 -04:00
Boris Zbarsky
a0bb95a823 Bug 993889 part 1. Remove "scope" argument from nsContentUtils::WrapNative. r=bholley 2014-04-10 00:58:41 -04:00
Boris Zbarsky
79dab91ff6 Bug 991742 part 8. Remove the "aScope" argument of WebIDL/nsWrapperCache WrapObject() methods. r=bholley
This patch was mostly generated with the following command:

find . -name "*.h" -o -name "*.cpp" | xargs sed -e '/WrapObject(JSContext/ {; N; s/\(WrapObject(JSContext *\* *a\{0,1\}[Cc]x\),\n\{0,1\} *JS::Handle<JSObject\*> a\{0,1\}[sS]cope/\1/ ; }' -i ""

and then reverting the changes that made to
dom/bindings/BindingUtils.h, since those WrapObject methods are not
the ones we're trying to change here, plus a bunch of manual fixups
for cases that this command did not catch (including all the callsites
of WrapObject()).
2014-04-08 18:27:18 -04:00
Boris Zbarsky
d4bd64ee2c Bug 991742 part 6. Remove the "aScope" argument of binding Wrap() methods. r=bholley
This patch was mostly generated with this command:

find . -name "*.h" -o -name "*.cpp" | xargs sed -e 's/Binding::Wrap(aCx, aScope, this/Binding::Wrap(aCx, this/' -e 's/Binding_workers::Wrap(aCx, aScope, this/Binding_workers::Wrap(aCx, this/' -e 's/Binding::Wrap(cx, scope, this/Binding::Wrap(cx, this/' -i ""

plus a few manual fixes to dom/bindings/Codegen.py, js/xpconnect/src/event_impl_gen.py, and a few C++ files that were not caught in the search-and-replace above.
2014-04-08 18:27:17 -04:00
Boris Zbarsky
d7fa8f56be Bug 991742 part 1. Enter the compartment of the current wrapper before we try to reparent objects. r=bholley
This lets us preserve some invariants about our current compartment matching the scope we want to wrap into.
2014-04-08 18:27:15 -04:00
Peter Van der Beken
4b64c1bee2 Bug 993057 - Fix Xrays to disallow indexed expando properties on Xrays for Window with a WebIDL binding. r=bholley.
--HG--
extra : rebase_source : a7762fc56b9ad1801be22aa3380f430b44082f9e
2014-02-15 22:12:35 +01:00
Peter Van der Beken
66e04fabbd Bug 993053 - Add xpc::InitGlobal containing the common code for wrapping main-thread XPConnect and WebIDL globals. r=bholley.
--HG--
extra : rebase_source : b385e1a3bebc1ef76a49bd2fb0555b3dba640f0d
2014-02-05 22:09:19 +01:00
Peter Van der Beken
9bbd30a4ac Bug 990158 - Make inner windows use their wrapper cache. r=bz.
--HG--
extra : rebase_source : bc040c75280bb45ae7ab0ed302130ff5d7178153
2013-11-09 11:20:22 +01:00