Skip to content

Commit

Permalink
[Devtools] isTrusted in CustomEvents shown twice in console
Browse files Browse the repository at this point in the history
Fixed bug where isTrusted would show up twice in console when custom
events were expanded. Caused because isTrusted is Unforgable which
makes it both OwnProperty always and an AccessorProperty.

BUG=607819
R=lushnikov

Review-Url: https://codereview.chromium.org/1942883002
Cr-Commit-Position: refs/heads/master@{#391049}
  • Loading branch information
allada authored and Commit bot committed May 2, 2016
1 parent 4a00752 commit 68642cb
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions front_end/sdk/RemoteObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -978,13 +978,25 @@ WebInspector.RemoteObject.loadFromObjectPerProto = function(object, callback)
if (--resultCounter)
return;
if (savedOwnProperties && savedAccessorProperties) {
var combinedList = savedAccessorProperties.slice(0);
var propertiesMap = new Map();
var propertySymbols = [];
for (var i = 0; i < savedAccessorProperties.length; i++) {
var property = savedAccessorProperties[i];
if (property.symbol)
propertySymbols.push(property);
else
propertiesMap.set(property.name, property);
}
for (var i = 0; i < savedOwnProperties.length; i++) {
var property = savedOwnProperties[i];
if (!property.isAccessorProperty())
combinedList.push(property);
if (property.isAccessorProperty())
continue;
if (property.symbol)
propertySymbols.push(property);
else
propertiesMap.set(property.name, property);
}
return callback(combinedList, savedInternalProperties ? savedInternalProperties : null);
return callback(propertiesMap.valuesArray().concat(propertySymbols), savedInternalProperties ? savedInternalProperties : null);
} else {
callback(null, null);
}
Expand Down

0 comments on commit 68642cb

Please sign in to comment.