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

67 Коммитов

Автор SHA1 Сообщение Дата
Jon Coppeard 0173f129e8 Bug 1388728 - Rename JS APIs for loading modules in line with the spec r=bkelly 2017-08-22 10:07:49 +01: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
Nicholas Nethercote 4b364cf3f3 Bug 1375299 (part 1) - Reduce usage of MOZ_GECKO_PROFILER. r=mstange.
This patch reduces the differences between builds where the profiler is enabled
and those where the profiler is disabled. It does this by removing numerous
MOZ_GECKO_PROFILER checks.

These changes have the following consequences.

- Various functions and classes are now defined in all builds, and so can be
  used unconditionally: profiler_add_marker(), profiler_set_js_context(),
  profiler_clear_js_context(), profiler_get_pseudo_stack(), AutoProfilerLabel.
  (They are effectively no-ops in non-profiler builds, of course.)

- The no-op versions of PROFILER_* are now gone. The remaining versions are
  almost no-ops when the profiler isn't built.

--HG--
extra : rebase_source : 8fb5e8757600210c2f77865694d25162f0b7698a
2017-06-22 06:26:16 +10:00
Nicholas Nethercote 0be77baa96 Bug 1370329 (part 1) - Clean up the profiler's RAII classes. r=mstange.
This patch does the following renamings, which increase consistency.

- GeckoProfilerInitRAII -> AutoProfilerInit
- GeckoProfilerThread{Sleep,Wake}RAII -> AutoProfilerThread{Sleep,Wake}
- GeckoProfilerTracingRAII -> AutoProfilerTracing
- AutoProfilerRegister -> AutoProfilerRegisterThread
- ProfilerStackFrameRAII -> AutoProfilerLabel
- nsJSUtils::mProfilerRAII -> nsJSUtils::mAutoProfilerLabel

Plus a few other minor ones (e.g. local variables).

The patch also add MOZ_GUARD_OBJECT macros to all the profiler RAII classes
that lack them, and does some minor whitespace reformatting.

--HG--
extra : rebase_source : 47e298fdd6f6b4af70e3357ec0b7b0580c0d0f50
2017-06-07 12:33:19 +10:00
Nicholas Nethercote caf0e9ec84 Bug 1367654 (part 2) - In GeckoProfiler.h, rename Sampler* as Profiler*. r=mstange.
Because everything else in this file is called ProfilerFoo or PROFILER_FOO.

--HG--
extra : rebase_source : ddab03809d321d4a301f309750e9cf55a528d467
2017-05-26 14:54:33 +10:00
Nicolas B. Pierron 8ea6209d25 Bug 1364117 - Encode JS bytecode of scripts which are parsed on the main thread. r=mrbkap 2017-05-29 16:01:37 +00:00
Nicolas B. Pierron 9812c67569 Bug 1366773 - Move buffer argument from JS::StartIncrementalEncoding to JS::FinishIncrementalEncoding. r=mrbkap,shu 2017-05-24 18:28:19 +00:00
Nicolas B. Pierron 49b55aae35 Bug 900784 part 1.0 - Add nsJSUtils functions for encoding and decoding the bytecode. r=mrbkap 2017-04-21 16:57:57 +00:00
Nicolas B. Pierron 5e65ca8119 Bug 1349618 - Guard ExecutionContext::mSamplerRAII with the MOZ_GECKO_PROFILER macro. r=njn 2017-03-23 10:55:25 +00:00
Nicolas B. Pierron 39741d711a Bug 1331662 part 2 - Replace nsJSUtils::EvaluateString calls by ExecutionContext scopes. r=bz 2017-03-22 13:42:27 +00:00
Nicolas B. Pierron bb7321907a Bug 1331662 part 1 - Reimplement EvaluateString using the ExecutionContext class. r=bz 2017-03-22 13:42:26 +00:00
Boris Zbarsky 17ccfd1011 Bug 1306472. Back out bug 1268047, because the spec it tried to implement backs the web. r=smaug 2016-10-13 12:10:23 -04:00
Boris Zbarsky 42a30322ba Bug 1276400 part 1. Get rid of AutoDontReportUncaught and its one consumer. r=bkelly 2016-05-31 22:00:17 -04:00
Boris Zbarsky 5029f3d16a Bug 1268047 part 3. Remove the now-unused coerce-to-string option from nsJSUtils::EvaluateOptions. r=peterv 2016-05-09 22:25:40 -04:00
Jon Coppeard 19bcb45545 Bug 1240072 - Add nsJSUtils methods for creating and instantiating modules r=sicking 2016-05-07 12:46:38 +01:00
Nicholas Nethercote 546b92e4cc Bug 1200484 (part 4) - Expose the column number in nsJSUtils::GetCallingLocation(). r=mrbkap.
The patch also makes the filename optional, to match the column, and to make
GetCallingLocation() more similar to JS::DescribeScriptedCaller().

--HG--
extra : rebase_source : 3e6f8dfdf6feb640cf548c44ff257b543f3a90a5
2015-09-01 17:56:03 -07:00
Ted Clancy 9e3bed7203 Bug 1172609 - Part 6: Add nsJSUtils::ResetTimeZone() function. r=ehsan 2015-06-15 00:44:09 -07:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Boris Zbarsky 3437c1a714 Bug 1174486 part 4. Stop reporting exceptions in nsJSUtils::EvaluateString and have its consumers use AutoJSAPIs that take ownership of error reporting instead. r=bholley 2015-06-15 20:11:06 -04:00
Boris Zbarsky 594e048a9f Bug 1174486 part 3. Eliminate the unused codepath on which EvaluateOptions::reportUncaught is false. r=bholley 2015-06-15 20:10:50 -04:00
Andrew McCreight 9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Dave Huseby 668fe30a84 Bug 1115375 - [JSAPI] Add nsAutoJSString::Init that doesn't require a JSContext. r=bholley 2015-02-19 14:16:00 -05:00
Mike Hommey a35dbaeebf Bug 1126593 - Add a global fallible instance, so that using fallible works directly, everywhere. r=njn
--HG--
rename : memory/mozalloc/fallible.h => memory/fallible/fallible.h
2015-02-02 09:56:13 +09:00
Jeff Walden e1844a8d25 Bug 1112774 - Add a raft of other conversion methods to js/public/Conversions.h past just JS::ToObject. r=jorendorff
--HG--
extra : rebase_source : 5d04a08a8fd51952283ce2a819149da035311b59
2014-12-17 13:50:20 -08:00
Bobby Holley a5bfe5cf02 Bug 1117851 - Make GetCallingLocation take an nsA{,C}String. r=smaug 2015-01-05 13:53:27 -08:00
Boris Zbarsky 9604d3f7a4 Bug 1100580 part 2. Get rid of EvaluateOptions::needResult, since we can use JS::CompileOptions::noScriptRval (with the opposite meaning, but same default behavior) for this purpose. r=bholley 2014-11-18 11:01:09 -05:00
Boris Zbarsky 145c29fee6 Bug 1100580 part 1. Drop support for having an off-thread compilation token and wanting a script rval from nsJSUtils::EvaluateString, since we never need that in practice. r=bholley 2014-11-18 11:01:08 -05:00
Boris Zbarsky e25768cbf9 Bug 1095660 part 5. Change nsJSUtils::EvaluateString to take an explicit scope chain. r=bholley 2014-11-12 17:04:29 -05:00
Boris Zbarsky 644beaf30b Bug 1088228 part 2. Create an nsJSUtils API for building the scope chain for a given Element. r=peterv 2014-10-30 17:40:09 -04:00
Wes Kocher e0d9ddc182 Backed out 6 changesets (bug 1088228) for static analysis bustage
Backed out changeset 13ecff800114 (bug 1088228)
Backed out changeset de692c3335f2 (bug 1088228)
Backed out changeset 2d449a2b4e1c (bug 1088228)
Backed out changeset 49ac8f33ab70 (bug 1088228)
Backed out changeset 920d50e84a17 (bug 1088228)
Backed out changeset 55f4818378e4 (bug 1088228)
2014-10-30 16:24:02 -07:00
Boris Zbarsky 677958f38c Bug 1088228 part 2. Create an nsJSUtils API for building the scope chain for a given Element. r=peterv 2014-10-30 17:40:09 -04:00
Boris Zbarsky 44aee3562d Bug 1083648 part 3. Change nsJSUtils::CompileFunction to take an explicit scope chain vector, not just a single scope object, and pass in the right objects in CompileEventHandlerInternal. r=bholley 2014-10-25 00:50:29 -04:00
Bobby Holley 0e8bf218c0 Bug 1070842 - Move nsJSUtils::CompileFunction (and consequently event handler compilation and XBL compilation) off of nsJSUtils::ReportPendingException. r=bz 2014-09-29 15:34:21 +02:00
Bobby Holley 30533a5753 Bug 796938 - Remove GetDynamicScriptContext API. r=smaug 2014-08-19 12:02:08 -07:00
Bobby Holley 6a19789e3b Bug 796938 - Remove GetDynamicScriptGlobal API. r=smaug 2014-08-19 12:02:07 -07:00
Ehsan Akhgari c8380d74dd Bug 1045067 - Fix some bad implicit constructors in dom/content/ipc; r=smaug 2014-07-28 13:17:51 -04:00
Neil Rashbrook 5aea9a701a Bug 1041140 Fix design flaws in FakeString r=bz 2014-07-19 14:23:19 +01:00
Jan de Mooij 2a7ce8f885 Bug 1034689 part 2 - Add AssignJSFlatString and use it. r=bz,terrence 2014-07-12 09:43:06 +02:00
Jan de Mooij 44da586636 Bug 1034191 - Make nsDependentJSString users work with Latin1 strings and nursery-allocated strings. r=bz 2014-07-05 17:30:54 +02:00
Bobby Holley 699946fc90 Bug 1022016 - Redesign nsDependentJSString API to be less of a footgun. r=gabor 2014-06-10 20:15:56 -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
Ben Kelly add3a9cc4a Bug 987556 Part 4 Use JS::SourceBufferHolder in nsJSUtils::EvaluateString(). r=bz 2014-04-25 10:11:56 -04:00
Jon Coppeard fb6ccb11db Bug 959787 - Handlify JS_ExecuteScript and JS::Evaluate APIs r=terrence r=bz 2014-04-01 11:34:39 +01:00
Nikhil Marathe d5f6f72d7b Bug 939332 - Implement Promise.all, Promise.cast, Promise.race. r=bz
--HG--
extra : rebase_source : 72c1a87a6352005765442ea8903cfa16da8608fd
extra : amend_source : 71b6af7c8446cd501bc337d50a345f24814f20db
2013-11-19 13:53:00 -08:00
Ms2ger 0fdc697b63 No bug - Fix some style issues in DOM code. 2013-11-11 09:04:41 +01:00
Brian Hackett 50b241c8d8 Bug 906371 - Use off thread JS parsing when loading async scripts, r=bz,billm. 2013-09-11 17:42:09 -06:00
Ehsan Akhgari 99058b577c Bug 905353 - Minimize the #includes in dom/base; r=jst
--HG--
extra : rebase_source : e7a1d2262bf6d8c9b78057b8eb6cdbfd98262f68
2013-08-15 14:17:48 -04:00
Bobby Holley c3e996b45d Bug 901362 - Give EvaluateString consumers the option to propagate exceptions instead of reporting. r=gabor 2013-08-08 16:51:35 -07:00
Bobby Holley a4f15f4503 Bug 901362 - Refactor nsJSUtils::EvaluateString to take an EvaluateOptions structure. r=gabor 2013-08-08 16:51:35 -07:00
Bobby Holley 1315953921 Bug 901162 - Hoist EvaluateString into nsJSUtils. r=bz 2013-08-08 16:51:34 -07:00