Граф коммитов

4160 Коммитов

Автор SHA1 Сообщение Дата
Alphan Chen 252278116e Bug 1362075 - Correct window.open() URL failure exception. r=ehsan
--HG--
extra : rebase_source : 6a9e42e6b6528890631c89b14684578cc8475364
2017-08-08 02:07:00 +02:00
Dragana Damjanovic dd.mozilla@gmail.com 23c8b30d23 Bug 1381282 - Change nsScriptErrorBase::InitWithWindowID so that it does not call GetSensitiveInfoHiddenSpec as much as now. r=bz r=valentin 2017-08-07 15:56:30 +02:00
Masatoshi Kimura 49e04cc095 Bug 1149830 - Remove nsIStackFrame::language. r=bz,mccr8
MozReview-Commit-ID: LxTiLFzNJ9Y

--HG--
extra : rebase_source : 98ca14aa59a62309dcbe0c9ed3e961c730ff9db9
2017-08-03 15:50:07 +09:00
Christoph Kerschbaumer 432d6fc782 Bug 1366695: Convert dom/bindings/test/test_barewordGetsWindow.html to comply with new data: URI inheritance model. r=smaug 2017-08-03 21:00:41 +02:00
Nicholas Nethercote f5c5231809 Bug 1382955 (part 1) - Remove MozPowerManager and related things. r=bz,gsvelto.
This includes the FactoryReset stuff.
2017-08-02 10:04:36 +10:00
Jan de Mooij bbe72b0768 Backed out changeset 78859e22ce17 (bug 1384513) for perf regressions.
--HG--
extra : rebase_source : fd6063fc8c2f0b9677e5dee4fbbe1c85c210dd7c
2017-08-01 10:41:43 +02:00
Kyle Machulis 2533883d04 Bug 1279218 - Rename HTMLSharedObjectElement to HTMLEmbedElement; r=bz
MozReview-Commit-ID: KkvRkFXAX30

--HG--
rename : dom/html/HTMLSharedObjectElement.cpp => dom/html/HTMLEmbedElement.cpp
rename : dom/html/HTMLSharedObjectElement.h => dom/html/HTMLEmbedElement.h
extra : rebase_source : 460c2a018e2a737b6397e8306127d73bc017d8da
2017-07-28 21:35:43 -07:00
Kyle Machulis ffa9be1bed Bug 1279218 - Remove Applet tag; r=bz
Removes applet tag interfaces, and changes HTML5 parser to output
HTMLUnknownElement when tag is found. Removes tag process from various
places in the browser.

MozReview-Commit-ID: 2zHhK2U2esX

--HG--
extra : rebase_source : d06ecaffd1cb656301e29b900bafde4c68a4606e
2017-07-10 16:00:30 -07:00
Nazım Can Altınova 0598921a5f Bug 1365900 - Extract CSSFontFeatureValuesRule base class r=xidorn
Extract CSSFontFeatureValuesRule from nsCSSFontFeatureValuesRule
class. This is necessary because we will create a FontFeatureValues
rule for Servo side.

MozReview-Commit-ID: GKy5wa6JLv9

--HG--
extra : rebase_source : 015f13da9a776c4ece8aa13655395afbb347b870
2017-07-24 16:12:57 -07:00
Carsten "Tomcat" Book d360d49d2a merge mozilla-inbound to mozilla-central a=merge 2017-07-27 10:57:25 +02:00
Kartikaya Gupta ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv

--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
2017-07-26 16:03:57 -04:00
Nathan Froyd a5c3b22cad Bug 1378965 - silently include codegen.pp for DOM bindings; r=chmanchester
codegen.pp isn't available immediately (there's a rule to generate it),
and so make warns when it's initially not found.  But since this is a
depends file, like other dependency files generated by the build
process, we should silently include it so make doesn't even warn about
it.
2017-07-25 11:17:32 -04:00
Jan de Mooij 7e5724db61 Bug 1383775 - Clean up function toString/toSource code, remove remnants of source decompiler. r=anba 2017-07-25 13:22:11 +02:00
Ting-Yu Chou a4c77b8ab9 Bug 1363959 - Compare jsid equality instead of string comparison in XrayResolveOwnProperty(). r=bholley
MozReview-Commit-ID: LFK5hR2RBGF

--HG--
extra : rebase_source : 1aa34b9998840302574f23c00d15ec713f70dcde
2017-07-20 15:12:03 +08:00
Till Schneidereit 6f4ae4701b Bug 1384513 - Follow-up to fix bustage from template usage of functions with a changed signature, on a CLOSED TREE. r=bustage
MozReview-Commit-ID: 5SsI4DoDwAT
2017-07-26 15:02:01 +02:00
Boris Zbarsky d226db3321 Bug 1371259 followup. Fix rooting analysis hazards in UnwrapObjectInternal. r=peterv pending 2017-07-10 18:04:49 -04:00
Boris Zbarsky 66481a7a29 Bug 1371259 part 9. Make UnwrapReflectorToISupports return already_AddRefed<nsISupports>. r=peterv
The main reason to not do this would be performance (avoiding the
addref/release), but there are two main mitigating factors:

1)  All calls to UnwrapReflectorToISupports that pass in a Web IDL object
    already do the addref (and in fact QI).  So this only affects the
    XPCWrappedNative case.

2)  The vast majority of the callers proceed to QI on the pointer anyway, and a
    second addref is cheap; it's the first addref after a CC that can be
    expensive on a cycle-collected object.

Going through the changes one by one:

* In GlobalObject::GetAsSupports, we do have a change that slightly slows down
  precisely in the XPCWrappedNative global case.  That's the message managers
  and the backstagepass.  And this really only affects calls to Web IDL statics
  from those globals.

* In UnwrapArgImpl we're talking about a Web IDL method taking an "external
  interface" type, and the UnwrapReflectorToISupports call is immediately
  followed by QI anyway.

* In UnwrapXPConnectImpl we're talking about the case when we have a
  non-WebIDL-object implementation of a Web IDL interface.  Again, this is the
  message manager globals, for EventTarget.  And we have a QI call immediately
  after the UnwrapReflectorToISupports.

* In the generated HasInstance hook for EventTarget we will be slightly slower
  when the LHS of the instanceof is an XPCWrappedNative.  And not much slower,
  because again there's an immediate QI.

* In InstallXBLField we're never going to have an XPCWrappedNative as thisObj;
  it's always an Element in practice.  So this is no more expensive than before.

* In sandbox's GetPrincipalOrSOP we now have an extra addref.  But it was
  followed by various QIs anyway.

* In XPCConvert::JSValToXPCException we have an extra addref if someone throws
  an XPCWrappedNative, which is fairly unlikely; our actual Exception objects
  are on Web IDL bindings.  Plus we have an immediate QI.

* In xpc::HasInstance we have an extra addred if the LHS of instanceof is an
  XPCWrappedNative.  But, again, there's an immediated QI after the
  UnwrapReflectorToISupports.

* In xpcJSWeakReference::Init we are likely doing an extra addref, but again
  immediately followed by QI.

I think it's worth making this change just to remove the footgun and that the
perf impact, if any, is pretty minimal.
2017-07-10 16:05:26 -04:00
Boris Zbarsky 9cdb2834a8 Bug 1371259 part 8. Get rid of nsIXPConnect::GetNativeOfWrapper. r=peterv
Most of these changes are just replacements of GetNativeOfWrapper with
UnwrapReflectorToISupports, which is all it did under the hood.

The other changes are as follows:

* In nsDOMClassInfo, we really care whether we have a window, so we can just
  UNWRAP_OBJECT to the Window interface, since Window is always on Web IDL
  bindings now.  Also, the weird compartment check hasn't been needed ever since
  GetNativeOfWrapper stopped returning things off the passed-in object's
  prototype chain (Firefox 22, bug 658909).
* The only use of do_QueryWrapper was to get a Window in nsDocument; again we
  can UNWRAP_OBJECT.
* In XPCJSRuntime, we again just want to check for a Window, so UNWRAP_OBJECT.
2017-07-10 16:05:25 -04:00
Boris Zbarsky cdd8fe10d4 Bug 1371259 part 4. Stop using UnwrapArg to unwrap this values. r=peterv 2017-07-10 16:05:25 -04:00
Boris Zbarsky 5c76874a46 Bug 1371259 part 3. Change UnwrapObject<> and the UNWRAP_OBJECT macro to allow passing in mutable object or value handles for the thing being unwrapped, and do so at various callsites. r=peterv
I did audit all UNWRAP_OBJECT callers to make sure that the lifetimes of all the
temporary Rooted or the RefPtrs they unwrap into are long enough.
2017-07-10 16:05:24 -04:00
Boris Zbarsky 5fd161c633 Bug 1371259 part 2. Change union conversions for non-owning unions to pass a MutableHandle through to the underlying conversion code. r=peterv 2017-07-10 16:05:24 -04:00
Boris Zbarsky 6ed5936b6b Bug 1371259 part 1. Pass maybe-mutable Value handles, not JSObject*, into CastableObjectUnwrapper. r=peterv
The idea is that CastableObjectUnwrapper will want to have a MutableHandle for
the thing it's unwrapping whenever its target is a raw pointer.  Since we have
convenient MutableHandle<Value> in most cases, it's easier to switch
CastableObjectUnwrapper to working with MutableHandle<Value> or Handle<Value>
instead of trying to get MutableHandle<JSObject*> in the right places.

There are basically two changes here:

1) Make CastableObjectUnwrapper work with at thing that looks like a Value.
2) Change various callsites to pass in MutableHandle<Value>, in addition to a
   Handle<Value>, into the JS-to-C++ conversion templates.  The
   MutableHandle<Value> is passed as ${maybeMutableVal}.  It may not actually
   end up being a MutableHandle in some cases.

The reason for passing both a Handle and a MutableHandle is that when the thing
we actually have is a Rooted named "foo" the Handle will be "foo" but the
MutableHandle is most naturally written as "&foo".  This is not a problem if
you're just passing it through, but if you want to test whether it's an object,
say, you have a problem.  Writing "foo.isObject()" is ok, but "&foo.isObject()"
is not, and neither is "(&foo).isObject()".  This could be worked around by
passing the MutableHandle as "JS::MutableHandle<JS::Value>(&foo)" or something,
and then "JS::MutableHandle<JS::Value>(&foo).isObject()" does work.  But it
makes the code very hard to read.

So we just pass both things along; ${val} should be used for readonly access and
${maybeMutableVal} any time you really want a MutableHandle.
2017-07-10 16:05:24 -04:00
L. David Baron c59666d841 Bug 1343715 - Split nsTSubstring::mFlags into separate variables for class and data flags. r=dmajor
MozReview-Commit-ID: JW1p5BxpHKA

--HG--
extra : transplant_source : %20e%CF%FA%60%A2%1Bn%1A%C6%A2%DBAy%3C%E0b%0C%077
2017-07-10 12:23:10 -07:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Ehsan Akhgari f2eb6c6f8d Bug 1378042 - Part 2: Make WebIDLNameTableKey::mHash PLDHashNumber; r=baku 2017-07-04 11:06:52 -04:00
Boris Zbarsky d471a06f87 Bug 1376954 part 2. Support nursery allocation of DOM proxy objects. r=smaug,jonco 2017-06-30 10:15:52 -07:00
Boris Zbarsky 239e1057ca Bug 1376954 part 1. Ensure that we don't try to nursery-allocate non-wrappercached DOM objects. r=smaug 2017-06-30 10:15:51 -07:00
Ting-Yu Chou 8f144f6221 Bug 1348099 part 3 - Fix the codegen so the methods for clearing cached attribute values are not unforgeable. r=bz
Current codegen list the methods for clearing cached attribute values in both
chrome only unforgeable methods and chrome only normal methods, but they should
exist only in the normal ones.

MozReview-Commit-ID: Il2JvCLZ2v3

--HG--
extra : rebase_source : 21b9c715c921c4ac7f6ed4c235ee79a3628162bd
2017-06-29 17:54:20 +08:00
Ting-Yu Chou a1814c7263 Bug 1348099 part 2 - Add tests for DOM Xrays that properties are exposed to only proper object types. r=bz
MozReview-Commit-ID: Iu86lAviFJK

--HG--
extra : rebase_source : ac0df64b504212a090934427e2c091eb40641877
2017-06-22 14:43:11 +08:00
Ting-Yu Chou 2a8c9b7ffd Bug 1348099 part 1 - Binary search property id when resolve DOM Xrays own property. r=bz
Currently we resolve a property by iterating every prefable and check whether it
is enabled.  If it is, we linear search the ids that it manages.  This patch
changes that to binary searching to find whether the id being resolved is
present first, and checking whether its prefable is enabled only when we find
it.  This improves the performance of property resolution, especially when the
property is not present.

The patch stores all the property ids a NativePropertiesN owns in a single array
of PropertyInfo structs.  Each struct contains an id and the information needed
to find the corresponding Prefable for the enabled check, as well as the
information needed to find the correct property descriptor in the Prefable.  We
also store an array of indices into the PropertyInfo array, sorted by bits of
the corresponding jsid.  Given a jsid, this allows us to binary search for the
index of the corresponding PropertyInfo, if any.  The index array requires 2
bytes for each property, which is ~20k across all our bindings.  The extra
information stored in each PropertyInfo requires 4 bytes for each property,
which is about 40k across all our bindings in 32-bit builds, or 80k in 64-bit
builds due to alignment requirements on PropertyInfo.  However we save a bit of
memory from changing NativePropertiesN's trios to duos.

The array of unsorted ids is kept because XrayOwnPropertyKeys() includes only
properties that are enabled.  Without it, we will need to check every single
property to know whether its prefable is enabled or not, which is inefficient.

With this patch, initializing property ids takes longer because of the sorting.
I measured also insertion sort because I thought the ids should be nearly sorted
as they are generated sequentially at run time, but that's not the case and
NS_QuickSort() runs faster.

MozReview-Commit-ID: Lc4Z1ui3t0o

--HG--
extra : rebase_source : 314efe467a14428c57f90af2ecc0ec5c47a31993
2017-06-12 12:13:38 +08:00
Boris Zbarsky 165cfab86b Bug 1371424 - Trace the right thing in TypedArray's TraceSelf implementation. r=mccr8 2017-06-08 16:56:43 -04:00
Boris Zbarsky b87612bde1 Bug 1374119. Use a bool pref cache for interface object enablement conditions instead of calling GetBool. r=qdot 2017-06-19 23:52:04 -04:00
Thomas Wisniewski 3646a5cbe9 Bug 1036659 - Don't call mozilla::DropJSObjects() in CallbackObject::DropJSObjects(). r=mccr8
MozReview-Commit-ID: AbD1NUqCvFD
2017-06-16 17:15:32 -04:00
Mats Palmgren ea75194536 Bug 1372031 - Use EnsureInserted instead of Contains+PutEntry to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 2ZG2qX3dyGa
2017-06-17 00:06:04 +02:00
Boris Chiou f8dbd6bb32 Bug 1339690 - Part 3: Drop spacing mode. r=birtles,smaug
MozReview-Commit-ID: 1c7jpzWQjVP

--HG--
extra : rebase_source : 7850e290abb5fd87684c99710666c881eb777eb4
2017-06-13 15:09:19 +08:00
Jan de Mooij bf6aed7a06 Bug 1370608 part 3 - Use JS_NewEnumerateStandardClasses outside js/src. r=bz 2017-06-14 10:39:11 +02:00
Jan de Mooij 83f290de99 Bug 1370608 part 1 - Move newEnumerate hook from ObjectOps to ClassOps. r=evilpie,bz 2017-06-14 10:37:44 +02:00
Peter Van der Beken 3455c5b415 Bug 1252211 - Convert TreeContentView to WebIDL. r=bz.
--HG--
extra : rebase_source : 78b770df8863b8165639c4a7a0eaabd5463c1090
2017-06-08 21:04:02 +02:00
Peter Van der Beken ae390ac4ca Bug 1252211 - Convert XUL template builders to WebIDL. r=bz.
--HG--
rename : layout/xul/tree/nsITreeView.idl => dom/webidl/TreeView.webidl
rename : dom/xul/templates/nsIXULTemplateBuilder.idl => dom/webidl/XULTemplateBuilder.webidl
extra : rebase_source : ccfc87c460e20027a4ea6b3cc04efe14802dc41e
2017-05-24 11:51:10 +02:00
Peter Van der Beken 9b9495bf79 Bug 1252211 - Remove DOMCI for TreeSelection, XULCommandDispatcher and XULControllers. r=bz.
--HG--
extra : rebase_source : 5a24af4928dbd7754850c6e3ceff6646bfe58c93
2017-05-18 09:07:25 +02:00
Carsten "Tomcat" Book 4a5a3d9f30 Backed out changeset 2c51cdd42834 (bug 1252211) for bustage 2017-06-13 12:20:33 +02:00
Carsten "Tomcat" Book 3ef39f1665 Backed out changeset 82c5f20d6ee2 (bug 1252211) 2017-06-13 12:20:16 +02:00
Carsten "Tomcat" Book dc97c12485 Backed out changeset 629ace67da3b (bug 1252211) 2017-06-13 12:20:14 +02:00
Peter Van der Beken d34f37d164 Bug 1252211 - Convert TreeContentView to WebIDL. r=bz.
--HG--
extra : rebase_source : 246c1dda3db15ed0332af895485853e6e5d1ffa4
extra : intermediate-source : 0312d6ff0792f8d9cb20f2e06cbae59d5bbf690a
extra : source : 7b808c16e93cbd395a9f57bda4a9206e11a6df69
2017-06-08 21:04:02 +02:00
Peter Van der Beken 7c1c7552a6 Bug 1252211 - Convert XUL template builders to WebIDL. r=bz.
--HG--
rename : layout/xul/tree/nsITreeView.idl => dom/webidl/TreeView.webidl
rename : dom/xul/templates/nsIXULTemplateBuilder.idl => dom/webidl/XULTemplateBuilder.webidl
extra : rebase_source : 6788542d65fe446e851eebd4804d7dba428c8c84
extra : source : 599f27e86cb7ba543b4014c91be89c67225064ec
2017-05-24 11:51:10 +02:00
Peter Van der Beken 9d549d2f23 Bug 1252211 - Remove DOMCI for TreeSelection, XULCommandDispatcher and XULControllers. r=bz.
--HG--
extra : rebase_source : db24985f7e8f6d4ca4df13015d565ec0063ba355
extra : source : f361697cb50b47dc4db94a6730b6604ab69217f5
2017-05-18 09:07:25 +02:00
Boris Zbarsky d7ec8ed805 Bug 1372371. Fix enumerability handling in the window resolve hook. r=qdot 2017-06-12 22:17:03 -04:00
Samuel Vargas 901459a071 Bug 1325113 - Implement support for WEBGL_compressed_texture_s3tc_srgb - r=jgilbert,qdot
MozReview-Commit-ID: mI4dlB2lK
2017-06-08 14:54:37 -07:00
Boris Zbarsky 2f1f31e6d0 Bug 1370640. Get rid of ProtoAndIfaceCache::EntrySlotIfExists. r=peterv 2017-06-07 12:56:27 -04:00
Boris Zbarsky 40b47041ab Bug 1370614. Replace some uses of ProtoAndIfaceCache::EntrySlotIfExists with a faster boolean-returning test function. r=froydnj 2017-06-07 12:56:27 -04:00