Skip to content

Commit

Permalink
Remove -DefineGetterSetter feature switch
Browse files Browse the repository at this point in the history
Re issue chakra-core#6
  • Loading branch information
Ian Halliday committed Jan 14, 2016
1 parent 7861d98 commit 52de067
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
1 change: 0 additions & 1 deletion lib/Runtime/Base/ThreadConfigFlagsList.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
FLAG(IsCollectGarbageEnabled, CollectGarbage)
FLAG(IsErrorStackTraceEnabled, errorStackTrace)
FLAG(Is__proto__Enabled, __proto__)
FLAG(IsDefineGetterSetterEnabled, DefineGetterSetter)
FLAG(IsLetAndConstEnabled, LetConst)
FLAG(IsES6UnicodeVerboseEnabled, ES6UnicodeVerbose)
FLAG_RELEASE(IsIntlEnabled, Intl)
Expand Down
18 changes: 6 additions & 12 deletions lib/Runtime/Library/JavascriptLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3584,13 +3584,10 @@ namespace Js
}
}

if (scriptContext->GetConfig()->IsDefineGetterSetterEnabled())
{
library->AddFunctionToLibraryObject(objectPrototype, PropertyIds::__defineGetter__, &JavascriptObject::EntryInfo::DefineGetter, 2);
library->AddFunctionToLibraryObject(objectPrototype, PropertyIds::__defineSetter__, &JavascriptObject::EntryInfo::DefineSetter, 2);
library->AddFunctionToLibraryObject(objectPrototype, PropertyIds::__lookupGetter__, &JavascriptObject::EntryInfo::LookupGetter, 1);
library->AddFunctionToLibraryObject(objectPrototype, PropertyIds::__lookupSetter__, &JavascriptObject::EntryInfo::LookupSetter, 1);
}
library->AddFunctionToLibraryObject(objectPrototype, PropertyIds::__defineGetter__, &JavascriptObject::EntryInfo::DefineGetter, 2);
library->AddFunctionToLibraryObject(objectPrototype, PropertyIds::__defineSetter__, &JavascriptObject::EntryInfo::DefineSetter, 2);
library->AddFunctionToLibraryObject(objectPrototype, PropertyIds::__lookupGetter__, &JavascriptObject::EntryInfo::LookupGetter, 1);
library->AddFunctionToLibraryObject(objectPrototype, PropertyIds::__lookupSetter__, &JavascriptObject::EntryInfo::LookupSetter, 1);

objectPrototype->SetHasNoEnumerableProperties(true);
}
Expand Down Expand Up @@ -6093,11 +6090,8 @@ namespace Js
REG_OBJECTS_LIB_FUNC(toString, JavascriptObject::EntryToString);
REG_OBJECTS_LIB_FUNC(valueOf, JavascriptObject::EntryValueOf);

if (config.IsDefineGetterSetterEnabled())
{
REG_OBJECTS_LIB_FUNC(__defineGetter__, JavascriptObject::EntryDefineGetter);
REG_OBJECTS_LIB_FUNC(__defineSetter__, JavascriptObject::EntryDefineSetter);
}
REG_OBJECTS_LIB_FUNC(__defineGetter__, JavascriptObject::EntryDefineGetter);
REG_OBJECTS_LIB_FUNC(__defineSetter__, JavascriptObject::EntryDefineSetter);

if (config.IsES6ObjectExtensionsEnabled())
{
Expand Down
2 changes: 0 additions & 2 deletions lib/common/ConfigFlagsList.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@ PHASE(All)
#define DEFAULT_CONFIG_Prejit (false)
#define DEFAULT_CONFIG_DeferNested (true)
#define DEFAULT_CONFIG_DeferTopLevelTillFirstCall (true)
#define DEFAULT_CONFIG_DefineGetterSetter (true)
#define DEFAULT_CONFIG_DirectCallTelemetryStats (false)
#define DEFAULT_CONFIG_errorStackTrace (true)
#define DEFAULT_CONFIG_FastPathCap (-1) // By default, we do not have any fast path cap
Expand Down Expand Up @@ -803,7 +802,6 @@ FLAGNR(Boolean, DebugWindow , "Send console output to debugger window"
FLAGNR(Boolean, DeferNested , "Enable deferred parsing of nested function", DEFAULT_CONFIG_DeferNested)
FLAGNR(Boolean, DeferTopLevelTillFirstCall , "Enable tracking of deferred top level functions in a script file, until the first function of the script context is parsed.", DEFAULT_CONFIG_DeferTopLevelTillFirstCall)
FLAGNR(Number, DeferParse , "Minimum size of defer-parsed script (non-zero only: use /nodeferparse do disable", 0)
FLAGNR(Boolean, DefineGetterSetter , "Enable IE11 __defineGetter__ and __defineSetter__ methods", DEFAULT_CONFIG_DefineGetterSetter)
FLAGNR(Boolean, DirectCallTelemetryStats, "Enables logging stats for direct call telemetry", DEFAULT_CONFIG_DirectCallTelemetryStats)
FLAGNR(Boolean, DisableArrayBTree , "Disable creation of BTree for Arrays", false)
FLAGNR(Boolean, DisableRentalThreading, "Disable rental threading when creating runtime", DEFAULT_CONFIG_DisableRentalThreading)
Expand Down
1 change: 0 additions & 1 deletion test/es6/rlexe.xml
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@
<test>
<default>
<files>definegettersetter.js</files>
<compile-flags>-DefineGetterSetter</compile-flags>
<baseline>definegettersetter.baseline</baseline>
</default>
</test>
Expand Down

0 comments on commit 52de067

Please sign in to comment.