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

5594 Коммитов

Автор SHA1 Сообщение Дата
Kris Maglione 31f241c6ca Bug 1333990: Follow-up: Return before wrapping result value on error. r=bz
MozReview-Commit-ID: AwGVr3gjzd0

--HG--
extra : rebase_source : 4987a60520941665b9fc6c0242d7f34ce43a060b
2017-03-17 14:34:55 -07:00
Kris Maglione b3d00ca35b Bug 1333990: Follow-up: Use safer conversion functions when creating error message JS strings. r=bz
MozReview-Commit-ID: FimoWFIgUxL

--HG--
extra : rebase_source : 7b9193ac1c12dc96b269ee3dea167edc4051669f
2017-03-17 16:53:04 -07:00
Kris Maglione f446374619 Bug 1333990: Follow-up: Add cycle collection and comments where unnecessary. r=bz
MozReview-Commit-ID: 70omvafFFFH

--HG--
extra : rebase_source : 4815476110a4eaf071241c3d98fc579c4d3f6dd5
2017-03-17 13:54:32 -07:00
Carsten "Tomcat" Book 3e0a5441c6 Merge mozilla-central to mozilla-inbound 2017-03-17 14:55:15 +01:00
Kris Maglione aaaea39c13 Bug 1333990: Part 1b - Add tests for script precompiler. r=shu
MozReview-Commit-ID: DVFFdyzY6Kn

--HG--
extra : rebase_source : d41324f18ee2c13e98f94ecec3af73e67da873ea
2017-03-16 16:55:59 -07:00
Kris Maglione 437f4e37d4 Bug 1333990: Part 1a - Add an async script pre-loading utility. r=billm,shu
MozReview-Commit-ID: 4vJF2drLeHS

--HG--
extra : rebase_source : 8adaa22d6d91ac6ef1804cf4c8d5698cf304b141
2017-03-16 19:10:40 -07:00
Boris Zbarsky c63be1e971 Bug 1347706. Update to spec change for [[SetPrototypeOf]] on cross-origin objects. It should return true if null is passed. r=bholley
MozReview-Commit-ID: 42je5yfBRee
2017-03-16 17:43:49 -04:00
Makoto Kato 20cb071f24 Bug 1347431 - Skip some xpcshell tests that is failure on Android without ENABLE_INTL_API. r=snorp
Sicne some tests doesn't work with --with-intl-api=no, we should skip it on Android

MozReview-Commit-ID: IjlH3aQdiqb

--HG--
extra : rebase_source : ac6d91bf291f6268ea29bcb29180b2f5197e012c
2017-03-16 12:54:25 +09:00
Blake Kaplan 18b64f8d42 Bug 1208957 - No need for a condvar for thread shutdown. r=billm
Now that we join on the thread exiting, we no longer need to have the thread
explicitly tell us it's shutting down.

MozReview-Commit-ID: LycPjUvyeX

--HG--
extra : rebase_source : 7b3d21c3d8de73a1ed511c7d6efefe2a73b2e02a
2017-03-14 23:36:02 -07:00
Blake Kaplan 9f2cfeccc4 Bug 1208957 - Join the watchdog thread to avoid shutdown races. r=billm
MozReview-Commit-ID: FlnPO2fJWVu

--HG--
extra : rebase_source : f7465994db184b21b4e0159c1b4ca3509c071f5b
2017-03-14 23:27:21 -07:00
Nicholas Nethercote 8876b32323 Bug 1345262 (part 5) - Fix how JS sampling is started/stopped by the profiler. r=mstange,djvj.
Currently, JS sampling has major problems.

- JS sampling is enabled for all JS threads from the thread that runs
  locked_profiler_start() -- currently only the main thread -- but the JS
  engine can't handle enabling from off-thread, and asserts. This makes
  profiling workers impossible in a debug build.

- No JS thread will be JS sampled unless enableJSSampling() is called, but that
  only happens in locked_profiler_start(). That means any worker threads
  created while the profiler is active won't be JS sampled.

- Only the thread that runs locked_profiler_stop() -- currently only the main
  thread -- ever calls disableJSSampling(). This means that worker threads that
  start being JS sampled never stop being JS sampled.

This patch fixes these three problems in the following ways.

- locked_profiler_start() now sets a flag in PseudoStack that indicates
  JS sampling is desired, but doesn't directly enable it. Instead, the JS
  thread polls that flag and enables JS sampling itself when it sees the flag
  is set. The polling is done by the interrupt callback. There was already a
  flag of this sort (mJSSampling) but the new one is better.

  This required adding a call to profiler_js_operation_callback() to the
  InterruptCallback() in XPCJSContext.cpp. (In comparison, the
  InterruptCallback() in dom/workers/RuntimeService.cpp already had such a
  call.)

- RegisterCurrentThread() now requests JS sampling of a JS thread when the
  profiler is active, the thread is being profiled, and JS sampling is enabled.

- locked_profiler_stop() now calls stopJSSampling() on all live threads.

The patch makes the following smaller changes as well.

- Renames profiler_js_operation_callback() as profiler_js_interrupt_callback(),
  because "interrupt callback" is the standard name (viz.
  JS_AddInterruptCallback()).

- Calls js::RegisterContextProfilingEventMarker() with nullptr when stopping
  JS sampling, so that ProfilerJSEventMarker won't fire unnecessarily.

- Some minor formatting changes.

--HG--
extra : rebase_source : 372f94c963a9e5b2493389892499b1ca205ebc2f
2017-03-10 09:04:23 +11:00
Nicholas Nethercote d8023679e3 Bug 1345262 (part 2) - Add profiler_{set,clear}_js_context(). r=mstange.
PseudoContext::sampleContext() is always called immediately after
profiler_get_pseudo_stack(). This patch introduces profiler_set_js_context()
and profiler_clear_js_context(), which replace the profiler_get_pseudo_stack()
+ sampleContext() pairs. This takes us a step closer to not having to export
PseudoStack outside the profiler.

--HG--
extra : rebase_source : 8558d1600eafd395cc696d31f3d21fb52a1a74b0
2017-03-09 17:06:35 +11:00
Geoff Brown 6eac32a3c5 Bug 1338809 - Build android xpcshell as position independent executable; r=glandium
This allows xpcshell-test to be run on Android 5.0 and greater at the
expense of Android 4.0: Run xpcshell on Android 4.1 and above.
2017-03-14 08:08:43 -06:00
Carsten "Tomcat" Book dba578960e merge mozilla-inbound to mozilla-central a=merge 2017-03-14 14:23:03 +01:00
Chih-Yi Leu ec60526d60 Bug 1315037 - Use NS_ENSURE_SUCCESS for nsresult diagnosis. r=erahm 2017-03-13 02:14:00 +01:00
Zibi Braniecki f096c9aab9 Bug 1346674 - Migrate all uses of nsILocaleService::GetApplicationLocale to mozILocaleService::GetAppLocale. r=jfkthame
MozReview-Commit-ID: 2E7mj3yQnxB

--HG--
extra : rebase_source : 97ba5b1738b2f116ec75830ed1b23f279680035e
2017-03-12 20:39:22 -07:00
Andrew McCreight 634490d4bf Bug 1344527 - Give up in ReadScriptAsync if we can't create a promise. r=bholley
MozReview-Commit-ID: Hq4vJZmfDpc

--HG--
extra : rebase_source : f3544bfc559aee379f66972ce97764354b6aa658
2017-03-09 09:24:28 -08:00
Christian Holler 1965d4b2e1 Bug 1345906 - Add ReloadPrefsCallback for fuzzing.enabled pref. r=jandem
MozReview-Commit-ID: 5lNyaebmt1h

--HG--
extra : rebase_source : 331dcf55caaa662203a501e5d0fa16f692b61793
2017-03-09 16:47:34 +01:00
Wes Kocher 3842d8fcef Merge inbound to central, a=merge
MozReview-Commit-ID: 62e9XDudUlc
2017-03-08 17:07:55 -08:00
Shu-yu Guo c91e65240b Bug 1108941 - Implement the per-global template literal registry. (r=arai,jonco) 2017-03-08 12:00:54 -08:00
Boris Zbarsky 2ab128503c Bug 1344443. Fix [[SetPrototypeOf]] on cross-origin objects to follow the spec. r=bholley,waldo
MozReview-Commit-ID: JI9fbQTS0PS
2017-03-08 03:14:38 -05:00
Carsten "Tomcat" Book 96fe421b34 Merge mozilla-central to autoland 2017-03-08 17:04:17 +01:00
David Teller c1b5f21196 Bug 1343483 - Determine how long functions remain syntax-parsed before they are full-parsed;r=shu
In many cases, to speed up start, compiling a ScriptSource will not
compile the functions themselves, but will rather syntax-parse them
(to check for syntax errors), leaving full compilation for
later. However, if we find ourselves in a case in which the function
is needed almost immediately, we need to full-parse the function
immediately after the syntax-parse, which is wasteful.

This changeset intends to measure how often this happens, by exporting
through Telemetry the duration between the end of the syntax-parse and
the start of the full-parse for each function.

As a memory optimization, instead of storing a timestamp for the
syntax-parse of each function, we store a single timestamp for an
entire ScriptSource. This assumes that all functions of the
ScriptSource are syntax-parsed at approximately the same instant,
which should be mostly true for everything except perhaps `eval` and
`new Function`. Then, when time comes to delazify a function, we
simply determine the time elapsed since the ScriptSource was compiled.

Histogram JS_PARSER_COMPILE_LAZY_AFTER_MS starts at 10ms (anything
smaller is often not measurable) and stops at 10s (anything larger can
safely be said to be not wasteful).

MozReview-Commit-ID: 6Ycy2OIIiAt

--HG--
extra : rebase_source : 0ccd6f51189b3ad8056e9f39e267235d68f6e2db
2017-03-06 21:22:00 +01:00
Ehsan Akhgari df3bce859e Bug 1344974 - Part 3: Speed up principal access checks in WrapperFactory::Rewrap() by eliminating virtual dispatch and inling; r=bholley 2017-03-07 00:29:44 -05:00
Ehsan Akhgari 3169d6c35c Bug 1340710 - Part 6: Store BasePrincipal::{mOriginNoSuffix,mOriginSuffix} as a pair of atoms; r=bholley
This has the nice side effect of making nsIPrincipal::GetOrigin() a bit faster
by avoiding computing the origin each time.
2017-03-06 22:27:53 -05:00
Ehsan Akhgari 65b2fe2b53 Bug 1343866 - Scope more nsCOMPtrs in XRE_XPCShellMain(); r=bsmedberg 2017-03-06 15:06:18 -05:00
Jan Varga e161ee742d Bug 1311057 - Part 1: Remove support for packaged apps from asmjscache; r=luke 2017-03-06 18:38:40 +01:00
Jon Coppeard 82cbd987a2 Bug 1338623 - Add a slower but more exact gray marking check for checking correctness r=sfink r=mccr8 2017-03-02 10:22:47 +00:00
Ehsan Akhgari 4f4a529bd2 Bug 1342719 - Optimize away a virtual function call in AccessCheck::isChrome; r=bholley 2017-02-27 09:39:50 -05:00
Phil Ringnalda ab84dcd8f5 Merge m-i to m-c, a=merge 2017-02-26 10:48:26 -08:00
Jan de Mooij 76f56574e3 Bug 1342439 part 1 - Replace macros to check for overrecursion with functions. r=luke 2017-02-25 16:07:56 +01:00
Masatoshi Kimura 7be7b11a1c Bug 1342144 - Remove version parameter from the type attribute of script elements. r=jmaher
This patch is generated by the following sed script:
find . ! -wholename '*/.hg*' -type f \( -iname '*.html' -o -iname '*.xhtml' -o -iname '*.xul' -o -iname '*.js' \) -exec sed -i -e 's/\(\(text\|application\)\/javascript\);version=1.[0-9]/\1/g' {} \;

MozReview-Commit-ID: AzhtdwJwVNg

--HG--
extra : rebase_source : e8f90249454c0779d926f87777f457352961748d
2017-02-23 06:10:07 +09:00
Olli Pettay 66be2f31cc Bug 1342244, try to avoid extra CompartmentPrivate::Get calls during Rewrap, r=bholley
--HG--
extra : rebase_source : 951f392a2d19a509ce951213686684cc326f4895
2017-02-24 15:03:38 +02:00
Kris Maglione d1e03c1b46 Bug 1322273: Return DeadObjectProxy when wrapping for nuked compartment. r=bholley
MozReview-Commit-ID: V07P0eZvKO

--HG--
extra : rebase_source : 822441921b2b0a968a7dec5a532bba5535cb871b
extra : absorb_source : dd03f3197d5a4c09d228c2168726f9ae2408a7bb
extra : source : e74563742aafb580f88ef17f2121dd385e37755a
2017-02-22 19:11:52 -08:00
Kris Maglione 42bebe8564 Bug 1322273: Cut wrappers that point out of a browser compartment when nuking it. r=bholley
MozReview-Commit-ID: FLS3xRgih2u

--HG--
extra : rebase_source : ffae5590afe3efcb70cdda6386f5b1d71123943c
extra : absorb_source : 8b3db1348e793dabca338841dc18b6d9021c6ef8
2017-02-23 13:56:10 -08:00
Nicholas Nethercote 352554c8f6 Bug 1340928 (part 10) - Remove nested calls to profiler_{init,shutdown}(). r=mstange.
The profiler can currently handle nested calls to profiler_{init,shutdown}() --
only the first call to profiler_init() and the last call to profiler_shutdown()
do anything. And sure enough, we have the following.

- Outer init/shutdown pairs in XRE_main()/XRE_InitChildProcess() (via
  GeckoProfilerInitRAII).

- Inner init/shutdown pairs in NS_InitXPCOM2()/NS_InitMinimalXPCOM() (both shut
  down in ShutdownXPCOM()).

This is a bit silly, so the patch removes the inner pairs, and adds a
now-needed pair in XRE_XPCShellMain. This will allow gInitCount -- which tracks
the nesting depth -- to be removed in a future patch.

--HG--
extra : rebase_source : 7e8dc6ce81ce10269d2db6a7bf32852c396dba0e
2017-02-15 17:08:38 +11:00
Andrea Marchesini e7a1e33581 Bug 1341250 - Moving nsExpandedPrincipal in separate files, r=qdot
--HG--
rename : caps/nsPrincipal.cpp => caps/nsExpandedPrincipal.cpp
rename : caps/nsPrincipal.h => caps/nsExpandedPrincipal.h
2017-02-22 10:01:43 +01:00
Sebastian Hengst 0ea43f8182 Backed out changeset f0886e3477a5 (bug 1341250) 2017-02-22 11:20:46 +01:00
Andrea Marchesini c83982c31f Bug 1341250 - Moving nsExpandedPrincipal in separate files, r=qdot
--HG--
rename : caps/nsPrincipal.cpp => caps/nsExpandedPrincipal.cpp
rename : caps/nsPrincipal.h => caps/nsExpandedPrincipal.h
2017-02-22 10:01:43 +01:00
Sylvestre Ledru 39d7cd6467 no bug - Fix a misleading indentation
MozReview-Commit-ID: 4yvVRRxoxC8
2017-02-19 14:27:57 +01:00
Masatoshi Kimura 47d59c07d5 Bug 1338971 - Stop using non-standard JavaScript in AutoConfig files. r=mkaply
MozReview-Commit-ID: F2dDRHAw02S

--HG--
extra : rebase_source : ca74dd69aa51e4eb8d832161e05f98cc2b42df3c
2017-02-13 22:18:12 +09:00
Tom Tromey d2667a2b27 Bug 1060419 - make AppendPrintf and nsPrintfCString use Printf.h, r=froydnj
MozReview-Commit-ID: 2E8FoiNxU8L

--HG--
extra : rebase_source : 810ac727bef0751f24edea18c52e0ec170bf367d
2016-12-14 09:32:21 -07:00
Tom Tromey 9ab784cd84 Bug 1060419 - make XPC_Log_print use VsprintfLiteral, r=froydnj
MozReview-Commit-ID: 9ruECevHqfs

--HG--
extra : rebase_source : 7b4ed9315952404f7ea75246da614e0ce67a3cd6
2016-12-09 10:18:04 -10:00
Andrea Marchesini 3043646e52 Bug 1339871 - Splitting dom/file/File.{h,cpp}, r=smaug
--HG--
rename : dom/file/File.cpp => dom/file/BaseBlobImpl.cpp
rename : dom/file/File.h => dom/file/BaseBlobImpl.h
rename : dom/file/File.cpp => dom/file/Blob.cpp
rename : dom/file/File.h => dom/file/Blob.h
rename : dom/file/File.cpp => dom/file/BlobImpl.cpp
rename : dom/file/File.h => dom/file/BlobImpl.h
rename : dom/file/File.cpp => dom/file/EmptyBlobImpl.cpp
rename : dom/file/File.h => dom/file/EmptyBlobImpl.h
rename : dom/file/File.cpp => dom/file/FileBlobImpl.cpp
rename : dom/file/File.h => dom/file/FileBlobImpl.h
rename : dom/file/File.cpp => dom/file/MemoryBlobImpl.cpp
rename : dom/file/File.h => dom/file/MemoryBlobImpl.h
rename : dom/file/File.cpp => dom/file/StreamBlobImpl.cpp
rename : dom/file/File.h => dom/file/StreamBlobImpl.h
rename : dom/file/File.h => dom/file/StringBlobImpl.h
rename : dom/file/File.h => dom/file/TemporaryBlobImpl.h
2017-02-16 18:26:38 +01:00
Wes Kocher 3797956aa6 Merge m-c to inbound a=merge
MozReview-Commit-ID: BemR756HJnR
2017-02-15 16:33:03 -08:00
Wes Kocher 017c515285 Merge inbound to m-c a=merge
MozReview-Commit-ID: IKI0zVtF1n9
2017-02-15 16:18:13 -08:00
Bill McCloskey 194043ae97 Bug 1339289 - Give names to a lot of common runnables (r=ehsan)
MozReview-Commit-ID: 5IdvK6kgoAW
2017-02-15 12:30:01 -08:00
Tooru Fujisawa 918d55e6ea Bug 1283712 - Part 7: Add nsIScriptErrorNote and nsIScriptError.notes. r=bholley 2017-02-15 23:53:06 +09:00
Tooru Fujisawa b025ee6d4e Bug 1283712 - Part 6: Add xpc::ErrorBase, xpc::ErrorNote, and xpc::ErrorReport.mNotes. r=bholley 2017-02-15 23:53:06 +09:00
Carsten "Tomcat" Book ed3d8d8286 merge mozilla-inbound to mozilla-central a=merge 2017-02-15 12:21:44 +01:00