mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-22 10:25:47 +01:00
Fix some property completion edge cases with wrapped natives.
This commit is contained in:
@@ -181,12 +181,18 @@ function debuggerProperties(obj) {
|
|||||||
* @default false
|
* @default false
|
||||||
* @returns {Generator}
|
* @returns {Generator}
|
||||||
*/
|
*/
|
||||||
|
function prototype(obj)
|
||||||
|
obj.__proto__ || Object.getPrototypeOf(obj) ||
|
||||||
|
XPCNativeWrapper.unwrap(obj).__proto__ ||
|
||||||
|
Object.getPrototypeOf(XPCNativeWrapper.unwrap(obj));
|
||||||
function properties(obj, prototypes, debugger_) {
|
function properties(obj, prototypes, debugger_) {
|
||||||
let orig = obj;
|
let orig = obj;
|
||||||
let seen = {};
|
let seen = {};
|
||||||
for (; obj; obj = prototypes && obj.__proto__) {
|
|
||||||
|
for (; obj; obj = prototypes && prototype(obj)) {
|
||||||
try {
|
try {
|
||||||
var iter = (!debugger_ || !services.get("debugger").isOn) && values(Object.getOwnPropertyNames(obj));
|
if (!debugger_ || !services.get("debugger").isOn)
|
||||||
|
var iter = values(Object.getOwnPropertyNames(obj));
|
||||||
}
|
}
|
||||||
catch (e) {}
|
catch (e) {}
|
||||||
if (!iter)
|
if (!iter)
|
||||||
|
|||||||
Reference in New Issue
Block a user