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

203 Коммитов

Автор SHA1 Сообщение Дата
Doug Thayer 04d1c8fd1e Bug 1756823 - Replace ConsoleAPIStorage observer calls with js array r=nchevobbe,webdriver-reviewers,geckoview-reviewers,agi,jdescottes
See the comment in the file explaining it. For a case of logging 100k numbers,
this dropped the time per number from 15 microseconds to 9 with the console
closed, and 55 microseconds to 38 with the console open. I think we could shave
off more with a native approach, but I don't know that it's worth it and it's
much more likely for that to introduce bugs.

Differential Revision: https://phabricator.services.mozilla.com/D143782
2022-05-03 17:21:59 +00:00
Julian Descottes 831fcbcb48 Bug 1609100 - Remove devtools.enabled check from Console.cpp r=baku,nchevobbe
Depends on D141467

The devtools.enabled preference was never really used in the end.
The devtools add-on plans were cancelled, as well as the devtools onboarding flows.

So I think this was essentially dead code.

Differential Revision: https://phabricator.services.mozilla.com/D141468
2022-03-28 11:12:07 +00:00
Norisz Fay 66797d7700 Backed out 5 changesets (bug 1609100) for causing mochitest failures on browser_check_identity_state.js CLOSED TREE
Backed out changeset 521cbbae0914 (bug 1609100)
Backed out changeset e22daee724f0 (bug 1609100)
Backed out changeset e5c4afe5dd66 (bug 1609100)
Backed out changeset e6ae2c01908e (bug 1609100)
Backed out changeset 3e59351660ab (bug 1609100)
2022-03-28 13:11:58 +03:00
Julian Descottes 23ffd69ef6 Bug 1609100 - Remove devtools.enabled check from Console.cpp r=baku,nchevobbe
Depends on D141467

The devtools.enabled preference was never really used in the end.
The devtools add-on plans were cancelled, as well as the devtools onboarding flows.

So I think this was essentially dead code.

Differential Revision: https://phabricator.services.mozilla.com/D141468
2022-03-28 08:57:37 +00:00
Emilio Cobos Álvarez 2b25e0298a Bug 1758702 - Avoid including RemoteWorkerChild in WorkerPrivate.h. r=asuth
This avoids having to include PRemoteBrowser* headers etc, which are not
exported otherwise.

Differential Revision: https://phabricator.services.mozilla.com/D140659
2022-03-17 19:06:51 +00:00
Eden Chuang 2266b31d41 Bug 1744025 - Replace include "mozilla/dom/WorkerPrivate.h" with include "mozilla/dom/WorkerScope.h" where WorkerPrivate->GlobalScope() is called. r=dom-worker-reviewers,smaug,jstutte
#include "mozilla/dom/WorkerScope.h" is removed from WorkerPrivate.h, where calling WorkerPrivate::GlobalScope() without include "WorkerScope.h" makes WorkerScope as an incomplete type.


Depends on 132800

Depends on D132800

Differential Revision: https://phabricator.services.mozilla.com/D133483
2022-01-25 08:53:03 +00:00
Norisz Fay 5edb88e27a Backed out 9 changesets (bug 1744025) for causing wpt failures on CheckedUnsafePtr.h CLOSED TREE
Backed out changeset 89dca4fc5940 (bug 1744025)
Backed out changeset 7aa395dcdbe4 (bug 1744025)
Backed out changeset 1580a4ea1a85 (bug 1744025)
Backed out changeset af171636a87f (bug 1744025)
Backed out changeset a5edfa1c9cd6 (bug 1744025)
Backed out changeset 8abd6ba69815 (bug 1744025)
Backed out changeset cfb822df5b3f (bug 1744025)
Backed out changeset 5598943a94fd (bug 1744025)
Backed out changeset 43186fbbf8b4 (bug 1744025)
2021-12-15 18:46:01 +02:00
Eden Chuang 4146950108 Bug 1744025 - Replace include "mozilla/dom/WorkerPrivate.h" with include "mozilla/dom/WorkerScope.h" where WorkerPrivate->GlobalScope() is called. r=dom-worker-reviewers,smaug,jstutte
#include "mozilla/dom/WorkerScope.h" is removed from WorkerPrivate.h, where calling WorkerPrivate::GlobalScope() without include "WorkerScope.h" makes WorkerScope as an incomplete type.


Depends on 132800

Depends on D132800

Differential Revision: https://phabricator.services.mozilla.com/D133483
2021-12-15 13:48:19 +00:00
Mike Hommey ad42c13a73 Bug 1733034 - Fix unreachable-code-return warnings in dom. r=smaug
dom/console/Console.cpp:2899:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
  return 0;
         ^
dom/console/Console.cpp:2955:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
  return 0;
         ^
dom/fetch/FetchDriver.cpp:252:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
  return NS_OK;
         ^~~~~

Differential Revision: https://phabricator.services.mozilla.com/D126870
2021-09-29 21:44:51 +00:00
Tooru Fujisawa cc92ef732d Bug 1708448 - Move property and element functions into js/public/PropertyAndElement.h. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D119619
2021-07-13 11:52:42 +00:00
Jan de Mooij 1deb4708b9 Bug 1713083 part 2 - Remove JSPROP_GETTER and JSPROP_SETTER. r=evilpie
We now set the descriptor's getter or setter when the corresponding argument
to DefineAccessorProperty is non-nullptr.

Usually the flag was passed only if the corresponding object argument was non-nullptr,
so there's no change in behavior for those.

The exception is `Console::PopulateConsoleNotificationInTheTargetScope` where we passed
JSPROP_SETTER with a nullptr setter. Changing this is likely okay; it shouldn't make a
difference for new properties anyway.

Note that code can still use the richer PropertyDescriptor API to set nullptr
getters/setters explicitly.

Differential Revision: https://phabricator.services.mozilla.com/D116091
2021-05-27 15:03:38 +00:00
Simon Giesecke ba3b6a2b06 Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in dom/console. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D104228
2021-02-09 18:19:44 +00:00
nchevobbe 1624b5bc35 Bug 1683882 - Parse console.trace for custom styling. r=baku.
Differential Revision: https://phabricator.services.mozilla.com/D100669
2021-01-06 06:03:49 +00:00
Ping Chen 93f7b2f2b0 Bug 1683228 - Check maxLogLevelPref value each time and use it when available. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D100204
2021-01-06 01:11:24 +00:00
Simon Giesecke 9758d919eb Bug 1583109 - Use StringJoin(Append) where easily possible. r=nika
Bug 1583109 introduced new function templates StringJoin and StringJoinAppend.
These are now used to replace several custom loops across the codebase that
implement string-joining algorithms to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D98750
2020-12-17 14:58:18 +00:00
Csoregi Natalia d8c9489b13 Backed out changeset 16d174e7c342 (bug 1583109) for bustage on nsReadableUtils.h. CLOSED TREE 2020-12-16 22:51:26 +02:00
Simon Giesecke 72babae175 Bug 1583109 - Use StringJoin(Append) where easily possible. r=nika
Bug 1583109 introduced new function templates StringJoin and StringJoinAppend.
These are now used to replace several custom loops across the codebase that
implement string-joining algorithms to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D98750
2020-12-16 19:38:23 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Sylvestre Ledru fde06f6d21 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Butkovits Atila 964cca3198 Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru 5f29324f60 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +00:00
Simon Giesecke e3c223da3e Bug 1648010 - Fix uses of NS_LITERAL_STRING with C string literals. r=geckoview-reviewers,agi,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80861
2020-07-01 08:34:12 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Kris Maglione 6aa06b33a7 Bug 1645510: Part 2 - Avoid using the unprivileged junk scope where possible. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D79720
2020-06-27 03:06:28 +00:00
Simon Giesecke 82dc9b2271 Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78027
2020-06-10 10:46:14 +00:00
Butkovits Atila e3dce68834 Backed out 3 changesets (bug 1643289, bug 1642949) for causing failure at test_headless_screenshot.html. CLOSED TREE
Backed out changeset 98c420f73380 (bug 1643289)
Backed out changeset 9447ea8910aa (bug 1643289)
Backed out changeset 0c827da9d847 (bug 1642949)
2020-06-10 10:07:23 +03:00
Simon Giesecke d419f0ff08 Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78027
2020-06-10 05:49:28 +00:00
Simon Giesecke 191a830575 Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70831
2020-04-24 13:31:14 +00:00
Andreas Farre 63e21eec70 Bug 1620594 - Part 1: Rework NS_ReleaseOnMainThreadSystemGroup. r=nika
To be able to remove SystemGroup, NS_ReleaseOnMainThreadSystemGroup
needs to have its dependency on SystemGroup removed. Since all
releases using SystemGroup would've released on the main thread anyway
we can safely replace NS_ReleaseOnMainThreadSystemGroup with
NS_ReleaseOnMainThread.

Depends on D64390

Differential Revision: https://phabricator.services.mozilla.com/D67631

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:23 +00:00
nemesisBR 279a7bf54a Bug 1624233 : Removed else after return statement. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D68167

--HG--
extra : moz-landing-system : lando
2020-04-02 17:34:09 +00:00
Andrea Marchesini 108ccd5e61 Bug 1625854 - Avoid crashing when console is unabled to serialize the message, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D68794

--HG--
extra : moz-landing-system : lando
2020-03-30 20:37:41 +00:00
Jon Coppeard c1e3671c97 Bug 1624810 - Set the multi-zone JS holder flag on appropriate cycle collected classes r=mccr8
Set the flag on the affected classes, which are:
 - CallbackTimeoutHandler
 - nsJSArgArray
 - CallbackObject
 - Console
 - MessageEvent
 - IDBIndexCursor
 - ExtendableMessageEvent
 - JSPurpleBuffer

Differential Revision: https://phabricator.services.mozilla.com/D68196

--HG--
extra : moz-landing-system : lando
2020-03-26 10:49:06 +00:00
Karl Tomlinson 3c6e2c84d6 Bug 1492011 assert that ConsoleStructuredCloneData::mGlobal is cleared before ConsoleRunnable destruction r=baku
Depends on D68000

Differential Revision: https://phabricator.services.mozilla.com/D68001

--HG--
extra : moz-landing-system : lando
2020-03-24 10:02:10 +00:00
Karl Tomlinson 701025e896 Bug 1492011 make ConsoleCallData::mRefCnt thread-safe r=baku
so that references can be released from the main thread and there is no need
to send a message to Console thread.

Depends on D67999

Differential Revision: https://phabricator.services.mozilla.com/D68000

--HG--
extra : moz-landing-system : lando
2020-03-24 10:02:07 +00:00
Karl Tomlinson 8000fcef11 Bug 1492011 introduce a separate class to hold main-thread data associated with each Console r=baku
This provides that ConsoleRunnable no longer has a reference to Console, which
previously needed to be released through a message to the console thread.

Differential Revision: https://phabricator.services.mozilla.com/D67999

--HG--
extra : moz-landing-system : lando
2020-03-25 01:06:16 +00:00
Karl Tomlinson 7a8ede2509 Bug 1492011 provide ID and Prefix on ConsoleCallData r=baku
to remove Console instance access from
PopulateConsoleNotificationInTheTargetScope().

Differential Revision: https://phabricator.services.mozilla.com/D67998

--HG--
extra : moz-landing-system : lando
2020-03-25 00:22:34 +00:00
Karl Tomlinson 876034cbe8 Bug 1492011 change CreateStartTimerValue and CreateLogOrEndTimerValue from instance to class method r=baku
Differential Revision: https://phabricator.services.mozilla.com/D67997

--HG--
extra : moz-landing-system : lando
2020-03-25 00:51:50 +00:00
Karl Tomlinson 42e23b8bed Bug 1492011 change CreateCounterOrResetCounterValue from instance method to nonmember function with internal linkage r=baku
Depends on D67995

Differential Revision: https://phabricator.services.mozilla.com/D67996

--HG--
extra : moz-landing-system : lando
2020-03-24 09:55:53 +00:00
Karl Tomlinson 74303d90fd Bug 1492011 change ProcessArguments from instance method to nonmember function with internal linkage r=baku
Depends on D67994

Differential Revision: https://phabricator.services.mozilla.com/D67995

--HG--
extra : moz-landing-system : lando
2020-03-24 09:55:41 +00:00
Karl Tomlinson 08d7ab99aa Bug 1492011 provide group stack parameter to PopulateConsoleNotificationInTheTargetScope() r=baku
This will support removal of Console class usage from main thread.

Depends on D67993

Differential Revision: https://phabricator.services.mozilla.com/D67994

--HG--
extra : moz-landing-system : lando
2020-03-24 09:04:00 +00:00
Karl Tomlinson 15ee47208b Bug 1492011 replace ArgumentsToValueList instance method with nsTArray::AppendElements() r=baku
Depends on D67992

Differential Revision: https://phabricator.services.mozilla.com/D67993

--HG--
extra : moz-landing-system : lando
2020-03-24 09:02:16 +00:00
Karl Tomlinson 3ec04c339f Bug 1492011 change ShouldIncludeStackTrace from instance to class method r=baku
Depends on D67991

Differential Revision: https://phabricator.services.mozilla.com/D67992

--HG--
extra : moz-landing-system : lando
2020-03-24 09:01:04 +00:00
Karl Tomlinson 36c19455ab Bug 1492011 Remove now-unused Console::mStatus r=baku
Depends on D67990

Differential Revision: https://phabricator.services.mozilla.com/D67991

--HG--
extra : moz-landing-system : lando
2020-03-24 09:00:49 +00:00
Karl Tomlinson 2f45248784 Bug 1492011 Remove Console::mCallDataStoragePending r=baku
Now that ConsoleCallData has nothing to trace, mCallDataStoragePending has no
purpose.

Depends on D67989

Differential Revision: https://phabricator.services.mozilla.com/D67990

--HG--
extra : moz-landing-system : lando
2020-03-24 08:58:51 +00:00
Karl Tomlinson ddd9e31d2f Bug 1492011 store raw JS arguments on Console separately from ConsoleCallData r=baku
so that all ConsoleCallData members can be destroyed on either thread.

ArgumentData::mArguments hold the same references that
ConsoleCallData::mCopiedArguments held previously.  The name change is because
the references are merely stored rather than any deep copy of objects.

Differential Revision: https://phabricator.services.mozilla.com/D67989

--HG--
extra : moz-landing-system : lando
2020-03-25 00:47:15 +00:00
Karl Tomlinson f49d456f4a Bug 1492011 consolidate StoreProfileData and StoreConsoleData into a single method with arguments parameter r=baku
This removes a dependency on JS objects on ConsoleCallData, and a reference to
the arguments on ConsoleProfileWorkerRunnable.

Differential Revision: https://phabricator.services.mozilla.com/D67988

--HG--
extra : moz-landing-system : lando
2020-03-24 08:31:48 +00:00
Andrea Marchesini 61c6fff328 Bug 1623385 - Console API must support the logging of SharedArrayBuffers, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D67494

--HG--
extra : moz-landing-system : lando
2020-03-19 16:32:56 +00:00
Kris Maglione c31aa68fb4 Bug 1535617: Part 2 - Clear weak references for most cycle collected objects on unlink. r=mccr8
This covers most cycle collected objects which support weak references, but
not the ones which inherit from a cycle collected class and don't do any cycle
collection on their own.

Differential Revision: https://phabricator.services.mozilla.com/D63962

--HG--
extra : moz-landing-system : lando
2020-02-25 19:44:39 +00:00
Andrea Marchesini 79a7598f57 Bug 1613147 - Console API on worker dispatches messages to the main-thread behind prefs, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D61578

--HG--
extra : moz-landing-system : lando
2020-02-04 16:04:08 +00:00
Andrea Marchesini c4cb10712a Bug 1609990 - AgentCluster comparison in MessagePort and BroadcastChannel - part 3 - CloneDataPolicy, r=smaug,sfink,lth
Differential Revision: https://phabricator.services.mozilla.com/D60485

--HG--
extra : moz-landing-system : lando
2020-01-24 16:31:21 +00:00