This allows navigation resulting in a blocked or error page without returning an error to the client. If an error page is reached, an error is returned in cases this was not specifically requested in the client: client.navigate("about:neterror") will navigate to this page and return to the client without an error, but client.navigate("does.not.exist.") will return to the client with an error as it has previously.
This splits the api for getWindowHandles and getChromeWindowHandles for those
managing windows and tabs separately in tests. getWindowHandles is
re-implemented to return tabs when appropriate, and getChromeWindowHandles is
added to correspond to individual os windows (the prior behavior of
getWindowHandles). current_window_handle now corresponds to a tab on desktop,
while chrome_window_handle is provided for the current OS window.
switch_to_window will accept either a chrome window handle or tab handle.
In the case of a tab, switching will select the tab. In the
case of a chrome window handle, the prior behavior is retained.
ReplaceSubstring() is an O(n*m) algorithm (n being the length of the
string and m being the number of occurrences of aTarget) because we have
to move the remainder of the string, search it again and potentially
memmove most of it again as we find more matches. This patch rewrites
that function to make it O(n+m).
Note that we currently don't build TestStrings.cpp, so the test case in
this patch is not run automatically, but the test case has been verified
to pass separately by moving the test function into Gecko and calling it
during startup and stepping through it in the debugger.
--HG--
extra : rebase_source : 0330c130520802392b92bd094dde85f57cfe6420
With this patch:
* SetPropertyHelper no longer calls lookupProperty hooks, which is nice
since there's no such thing in ES6.
* As SetPropertyHelper walks the prototype chain, as soon as it reaches a
non-native object, it calls that object's set hook, passing the original
receiver, and returns.
This means Proxy set traps will now be called per spec when triggered via
the prototype chain from a native object.
It also means that legacy scripted indirect proxies (Proxy.create) will
now sometimes have their set trap called when it wouldn't have been called
before. This seems to be confined to fuzztests in practice, since it only
matters when the proxy is used as the prototype of an ordinary object.
But it could cause trouble.
The same situation affects other proxies too: BaseProxyHandler::set() and
its overrides will all be called in new situations. It's inevitable though;
Reflect.set was going to enable all these situations anyway.
--HG--
extra : rebase_source : afd950d3593f5c6dc2c24c8aec92567d9c1269d2
At this point, SetPropertyHelper has been factored into five parts:
SetPropertyByDefining
SetNonexistentProperty
SetDenseOrTypedArrayElement
SetExistingProperty
SetPropertyHelper
each with a comment on top and a reasonably clear responsibility. The longest is less than 100 lines, including comments.
--HG--
extra : rebase_source : 590d09b7da81417f44580b06b5d5b4e634b641fa
As it stands, this code is relatively obscure, so the fact that it's amazingly busted is of little consequence. But once we implement ES6 assignment, this code will be fairly easy to trigger when assigning to any Proxy whose target is an Array.
--HG--
extra : rebase_source : 1e2741d096f5ac72ae8305aa548747242b44ace7
This one is a little complicated. There is some code in SetExistingProperty that is supposed to determine whether or not we should shadow a property that wasn't found on the receiver. This code does not work correctly for array.length properties. (array.length is a data property, so of course it should be shadowed -- but it is non-shadowable() because hasSlot() is false.)
Having fixed that bug, the call to SetArrayLength is only necessary in the non-shadowing case. (In fact, it would be unnecessary altogether but for Parallel JS.) This in turn makes 'attrs' unnecessary, so delete that.
This is a behavior change (a bug fix) in the case of proxies, as the test illustrates.
--HG--
extra : rebase_source : 18704b24f65bd3336d5c2b2f3e7366b01e7fcec0
If the XSAVE functionality is disabled by the OS (which can happen in
virtualized environments, for instance), AVX instructions shouldn't be emitted
by the JITs. See also the assembly rountines for both x86 and x64 at
https://software.intel.com/en-us/blogs/2011/04/14/is-avx-enabled/
--HG--
extra : rebase_source : 9008ada71bfc33283578197e0257b30533c650b2
extra : amend_source : 5a796ac9d53b9104a19a7c2354c6201e3c77028d