Jack Moffitt
c6ab60dbfc
Cargoify servo
2014-09-08 20:21:42 -06:00
Ms2ger
f925343552
Introduce ConstantSpec::get_value.
...
I'll need it for cross-origin wrappers as well.
2014-08-28 19:19:22 +02:00
Ms2ger
cadc84319a
Introduce the NativePropertyHooks struct.
...
This will be required for the cross-origin wrapper work.
2014-08-28 11:39:02 +02:00
Ms2ger
3274071b2c
Factor out code to call JS_DeletePropertyById2.
...
I'll need to write the same code again for cross-origin wrappers.
2014-08-27 12:56:53 +02:00
Ms2ger
2a7b53aea7
Throw a catchable exception from ThrowingConstructor.
2014-08-10 20:23:49 +02:00
Jack Moffitt
7a4321d649
Upgrade Rust.
2014-08-08 19:11:53 -06:00
Jack Moffitt
b91e6f30e0
Upgrade Rust.
2014-08-02 21:11:47 -06:00
Josh Matthews
4b516c184d
Merge pull request #2933 from Ms2ger/initialize_global
...
Assert that we're handed a DOM global in initialize_global.
2014-07-27 10:19:46 -04:00
Manish Goregaokar
9937b77dee
Merge pull request #2932 from Ms2ger/fixme-347
...
Add pointers to the relevant issue for some bugs; r=jdm
2014-07-26 22:54:12 +05:30
Ms2ger
692d4e847d
Assert that we're handed a DOM global in initialize_global.
2014-07-26 17:16:25 +02:00
Ms2ger
2ddb32bd2f
Add documentation for the DOM.
2014-07-26 17:14:34 +02:00
Ms2ger
875eda69e4
Add pointers to the relevant issue for some bugs.
2014-07-26 17:11:35 +02:00
Ms2ger
f403135d9e
Support Worker globals in global_object_for_js_object.
2014-07-15 22:29:04 +02:00
Ms2ger
829259fb79
Introduce abstractions for global scopes.
...
Part of #2811 .
2014-07-15 15:33:57 +02:00
Ms2ger
954ab7a2e3
Simplify the implementation of cx_for_dom_reflector.
2014-07-15 15:33:56 +02:00
Ms2ger
f963ed99ac
Rename variables that refer to global objects.
...
This clarifies whether those variables will point to a Window object or an
arbitrary global object.
Note in particular that all IDL Constructors will accept an arbitrary global
object.
2014-07-15 15:33:56 +02:00
Ms2ger
fd167f8922
Store proxy handlers in a static array rather than a hashtable per window.
2014-07-12 15:26:36 +02:00
Ms2ger
439bc78cab
Return a Temporary from *Binding::Wrap.
...
Returning a JS<T> is GC-unsafe.
This commit also includes some cleanup around Node and Document reflection.
2014-07-10 16:45:41 +02:00
Manish Goregaokar
7cc8e2eb57
Remove deref_mut from Untraceable/Traceable ( fixes #2736 )
2014-07-01 00:59:52 +05:30
Manish Goregaokar
f5b5b337d3
Upgrade to latest Rust.
2014-06-27 18:50:32 -06:00
Ms2ger
4f0d6979e7
Implement static attributes ( fixes #1989 ).
2014-06-22 15:15:18 +02:00
Ms2ger
4964d2792e
Pass the NativeProperties struct to CreateInterfaceObjects2.
...
This will simplify adding more kinds of properties, such as static attributes.
2014-06-22 13:25:18 +02:00
Ms2ger
886d401ff0
Introduce a NativeProperties struct to store the properties.
...
This will simplify adding more kinds of properties, such as static attributes.
2014-06-22 13:25:18 +02:00
Ms2ger
5acbea5199
Pass the interface object-related arguments to CreateInterfaceObjects2 together in an Option.
...
This clarifies the code and fixes our support of NoInterfaceObject interfaces.
2014-06-20 18:47:31 +02:00
Ms2ger
d7c4f2ba93
Stop pretending that CreateInterfaceObjects2 can return the interface object.
...
We do not currently support the case of a non-callback interface that doesn't
have an interface prototype object. (This case is not allowed by the WebIDL
specification; it was added to Gecko to allow feature-detecting the URL
interface. See <https://bugzilla.mozilla.org/show_bug.cgi?id=1026720 >.)
It follows that, if we call CreateInterfaceObjects2 at all, we will call it
with a protoClass argument, so there is no reason to use a nullable pointer
type for that argument.
Moreover, if we had actually supported that case, the returned interface
object would have been stored in the interface prototype object cache, to ill
effect.
2014-06-20 10:33:47 +02:00
Ms2ger
5a1ed6396e
Handle JSAPI OOM failures by task failure as soon as possible.
...
We already ensure to fail the task if GetProtoObject returns null, as we don't
have a useful way to handle OOM, and we don't wish to thread the failure
through to some place where we could handle it in a useful way.
Unfortunately, we cannot ensure through the type system that none of those
functions returns null, so we use assertions to check it dynamically.
2014-06-20 09:46:12 +02:00
Ms2ger
e09ed14362
Remove Reflectable::mut_reflector.
2014-06-13 19:19:58 +02:00
Ms2ger
c331b200b1
Use Cell for Reflector::object.
2014-06-13 19:19:56 +02:00
bors-servo
cc23f3c436
auto merge of #2633 : Ms2ger/servo/derefmut, r=jdm
...
Part of #1854 .
2014-06-11 13:59:01 -04:00
Ms2ger
07c67a1d5a
Use internal mutability for Window::browser_context.
2014-06-11 19:51:07 +02:00
Ms2ger
c12e18998e
Remove unused InitIds function.
2014-06-11 15:18:04 +02:00
Ms2ger
1a2896a3f3
Bonus: Make Reflector::object private.
2014-06-06 20:57:56 +02:00
Ms2ger
3e3536cf39
Fix and disable some compile warnings.
2014-06-06 20:56:44 +02:00
Ms2ger
d882bb7cc0
Store a slice in ConstantSpec, rather than a raw pointer.
2014-06-06 14:23:09 +02:00
Ms2ger
ba68203ebf
Remove the pointless terminator from ConstantSpec slices.
2014-06-06 14:10:41 +02:00
Ms2ger
0c54cd1634
Pass slices to CreateInterfaceObjects2 rather than raw pointers.
2014-06-06 14:01:09 +02:00
Ms2ger
999fc973c0
Squash a warning about deriving traits on a struct that contains a raw pointer.
2014-06-06 13:10:28 +02:00
Jack Moffitt
629c4c6afe
Upgrade Rust.
2014-06-05 09:58:59 -06:00
Tetsuharu OHZEKI
106627e6eb
"JS<T>::from_raw" should accept "*T" instead of "*mut T"
2014-05-31 01:10:19 +09:00
Ms2ger
51d2891c9b
Make GetProtoOrIfaceArray return the actual type.
2014-05-26 20:19:38 +02:00
Ms2ger
d5cb4377ef
Use *mut T for the T* pointers in SpiderMonkey.
2014-05-26 18:19:44 +02:00
Ms2ger
eaedeb07cb
Update Rust.
2014-05-22 16:36:40 -06:00
Ms2ger
8182105204
Use JS_ObjectToOuterObject in wrap callbacks.
2014-05-15 20:58:51 +02:00
Ms2ger
85285113e4
Instate a pre-wrap hook that outerizes its argument, to satisfy an undocumented JSAPI requirement.
2014-05-14 17:39:13 +02:00
Ms2ger
0016b1839e
Use a single JSContext per JSRuntime.
...
The long-term plan for SpiderMonkey is to eliminate JSContexts by merging
(most of) it into JSRuntime, so to future-proof our code, we should avoid
creating multiple JSContexts for the same JSRuntime.
However, this implies we'll have to use the same JSContext for objects in
different compartments, so we need to enter compartments. This is done by
using the with_compartment function.
2014-05-05 19:41:02 +02:00
Josh Matthews
91278da9dd
Address review comments.
2014-05-03 14:18:31 -04:00
Josh Matthews
0f2d0b1dc3
Address review comments.
2014-05-03 14:18:31 -04:00
Josh Matthews
7b3e6d1f21
Remove all root collections.
2014-05-03 14:18:31 -04:00
Josh Matthews
a09a4bd297
Root Temporary values for the duration of their lifetime.
2014-05-03 14:18:31 -04:00
Josh Matthews
522d3f167b
s/Unrooted/Temporary/g
2014-05-03 14:18:31 -04:00