Bug 1388709 - Remove console `originAttributes` property. r=kmag,baku
MozReview-Commit-ID: jwUAKSEgZE
--- a/devtools/server/actors/webconsole.js
+++ b/devtools/server/actors/webconsole.js
@@ -1797,17 +1797,16 @@ WebConsoleActor.prototype =
let result = WebConsoleUtils.cloneObject(message);
result.workerType = WebConsoleUtils.getWorkerType(result) || "none";
delete result.wrappedJSObject;
delete result.ID;
delete result.innerID;
delete result.consoleID;
- delete result.originAttributes;
result.arguments = Array.map(message.arguments || [], (obj) => {
let dbgObj = this.makeDebuggeeValue(obj, useObjectGlobal);
return this.createValueGrip(dbgObj);
});
result.styles = Array.map(message.styles || [], (string) => {
return this.createValueGrip(string);
--- a/dom/console/Console.cpp
+++ b/dom/console/Console.cpp
@@ -1502,23 +1502,16 @@ Console::PopulateConsoleNotificationInTh
ConsoleStackEntry frame;
if (aData->mTopStackFrame) {
frame = *aData->mTopStackFrame;
}
ClearException ce(aCx);
RootedDictionary<ConsoleEvent> event(aCx);
- // Save the principal's OriginAttributes in the console event data
- // so that we will be able to filter messages by origin attributes.
- JS::Rooted<JS::Value> originAttributesValue(aCx);
- if (ToJSValue(aCx, aData->mOriginAttributes, &originAttributesValue)) {
- event.mOriginAttributes = originAttributesValue;
- }
-
event.mAddonId = aData->mAddonId;
event.mID.Construct();
event.mInnerID.Construct();
if (aData->mIDType == ConsoleCallData::eString) {
event.mID.Value().SetAsString() = aData->mOuterIDString;
event.mInnerID.Value().SetAsString() = aData->mInnerIDString;
--- a/dom/console/ConsoleAPIStorage.js
+++ b/dom/console/ConsoleAPIStorage.js
@@ -124,21 +124,16 @@ ConsoleAPIStorageService.prototype = {
recordEvent: function CS_recordEvent(aId, aOuterId, aEvent)
{
if (!_consoleStorage.has(aId)) {
_consoleStorage.set(aId, []);
}
let storage = _consoleStorage.get(aId);
- // Clone originAttributes to prevent "TypeError: can't access dead object"
- // exceptions when cached console messages are retrieved/filtered
- // by the devtools webconsole actor.
- aEvent.originAttributes = Cu.cloneInto(aEvent.originAttributes, {});
-
storage.push(aEvent);
// truncate
if (storage.length > STORAGE_MAX_EVENTS) {
storage.shift();
}
Services.obs.notifyObservers(aEvent, "console-api-log-event", aOuterId);
--- a/dom/webidl/Console.webidl
+++ b/dom/webidl/Console.webidl
@@ -46,17 +46,16 @@ namespace console {
[ChromeOnly]
const boolean IS_NATIVE_CONSOLE = true;
};
// This is used to propagate console events to the observers.
dictionary ConsoleEvent {
(unsigned long long or DOMString) ID;
(unsigned long long or DOMString) innerID;
- any originAttributes = null;
DOMString addonId = "";
DOMString level = "";
DOMString filename = "";
unsigned long lineNumber = 0;
unsigned long columnNumber = 0;
DOMString functionName = "";
double timeStamp = 0;
sequence<any> arguments;