mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Replaces literal {} created lookup tables with Object.create
This commit is contained in:
parent
d6adf84159
commit
2edf2792dc
18 changed files with 106 additions and 104 deletions
|
@ -35,7 +35,7 @@ var Name = (function NameClosure() {
|
|||
|
||||
Name.prototype = {};
|
||||
|
||||
var nameCache = {};
|
||||
var nameCache = Object.create(null);
|
||||
|
||||
Name.get = function Name_get(name) {
|
||||
var nameValue = nameCache[name];
|
||||
|
@ -52,7 +52,7 @@ var Cmd = (function CmdClosure() {
|
|||
|
||||
Cmd.prototype = {};
|
||||
|
||||
var cmdCache = {};
|
||||
var cmdCache = Object.create(null);
|
||||
|
||||
Cmd.get = function Cmd_get(cmd) {
|
||||
var cmdValue = cmdCache[cmd];
|
||||
|
@ -281,7 +281,7 @@ var Ref = (function RefClosure() {
|
|||
// This structure stores only one instance of the reference.
|
||||
var RefSet = (function RefSetClosure() {
|
||||
function RefSet() {
|
||||
this.dict = {};
|
||||
this.dict = Object.create(null);
|
||||
}
|
||||
|
||||
RefSet.prototype = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue