Skip to content

Commit

Permalink
Fixes zloirock#173. Symbol()'s call to Object.defineProperty() access…
Browse files Browse the repository at this point in the history
…or descriptor should set a default 'get' property when adding a 'set' property. Prevents crash in old Qt Script engine (WebKit).
  • Loading branch information
bendiy committed Feb 25, 2016
1 parent 7bc6210 commit 5c7fef8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions library/modules/es6.symbol.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ var wrap = function(tag){
sym._k = tag;
DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
configurable: true,
get: undefined,
set: function(value){
if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
setSymbolDesc(this, tag, createDesc(1, value));
Expand Down
1 change: 1 addition & 0 deletions modules/es6.symbol.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ var wrap = function(tag){
sym._k = tag;
DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
configurable: true,
get: undefined,
set: function(value){
if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
setSymbolDesc(this, tag, createDesc(1, value));
Expand Down

0 comments on commit 5c7fef8

Please sign in to comment.