mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 14:45:29 +00:00
Bug 800857 - Handle getOwnPropertyDescriptor throwing when accessing "displayName", r=past
This commit is contained in:
parent
47c8a23d58
commit
0845691ee7
@ -2661,9 +2661,15 @@ ObjectActor.prototype = {
|
||||
|
||||
// Check if the developer has added a de-facto standard displayName
|
||||
// property for us to use.
|
||||
let desc = this.obj.getOwnPropertyDescriptor("displayName");
|
||||
if (desc && desc.value && typeof desc.value == "string") {
|
||||
g.userDisplayName = this.threadActor.createValueGrip(desc.value);
|
||||
try {
|
||||
let desc = this.obj.getOwnPropertyDescriptor("displayName");
|
||||
if (desc && desc.value && typeof desc.value == "string") {
|
||||
g.userDisplayName = this.threadActor.createValueGrip(desc.value);
|
||||
}
|
||||
} catch (e) {
|
||||
// Calling getOwnPropertyDescriptor with displayName might throw
|
||||
// with "permission denied" errors for some functions.
|
||||
dumpn(e);
|
||||
}
|
||||
|
||||
// Add source location information.
|
||||
|
Loading…
Reference in New Issue
Block a user