Skip to content

Commit

Permalink
Fixes: zloirock#173 Change 'Symbol()' wrap to use a 'data descriptor'…
Browse files Browse the repository at this point in the history
… for 'Object.defineProperty()' instead of an 'accessor descriptor'. Fixes RegExp.exec() creash in Qt Script.
  • Loading branch information
bendiy committed Feb 26, 2016
1 parent 7bc6210 commit 1f4c759
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions library/modules/es6.symbol.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@ var wrap = function(tag){
sym._k = tag;
DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
configurable: true,
set: function(value){
if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
setSymbolDesc(this, tag, createDesc(1, value));
}
enumerable: false,
writable: true
});
return sym;
};
Expand Down
6 changes: 2 additions & 4 deletions modules/es6.symbol.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@ var wrap = function(tag){
sym._k = tag;
DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
configurable: true,
set: function(value){
if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
setSymbolDesc(this, tag, createDesc(1, value));
}
enumerable: false,
writable: true
});
return sym;
};
Expand Down

0 comments on commit 1f4c759

Please sign in to comment.