Changeset 209553 in webkit
- Timestamp:
- Dec 8, 2016 11:43:31 AM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r209544 r209553 1 2016-12-08 Mark Lam <mark.lam@apple.com> 2 3 Enable JSC restricted options by default in the jsc shell. 4 https://bugs.webkit.org/show_bug.cgi?id=165615 5 6 Reviewed by Keith Miller. 7 8 The jsc shell is only used for debugging and development testing. We should 9 allow it to use restricted options like JSC_useDollarVM even for release builds. 10 11 * jsc.cpp: 12 (jscmain): 13 * runtime/Options.cpp: 14 (JSC::Options::enableRestrictedOptions): 15 (JSC::Options::isAvailable): 16 (JSC::allowRestrictedOptions): Deleted. 17 * runtime/Options.h: 18 1 19 2016-12-08 Chris Dumez <cdumez@apple.com> 2 20 -
trunk/Source/JavaScriptCore/jsc.cpp
r209500 r209553 3222 3222 int jscmain(int argc, char** argv) 3223 3223 { 3224 // Need to override and enable restricted options before we start parsing options below. 3225 Options::enableRestrictedOptions(true); 3226 3224 3227 // Note that the options parsing can affect VM creation, and thus 3225 3228 // comes first. -
trunk/Source/JavaScriptCore/runtime/Options.cpp
r208866 r209553 56 56 namespace JSC { 57 57 58 static bool allowRestrictedOptions() 59 { 58 namespace { 60 59 #ifdef NDEBUG 61 returnfalse;60 bool restrictedOptionsEnabled = false; 62 61 #else 63 return true; 64 #endif 65 } 66 62 bool restrictedOptionsEnabled = true; 63 #endif 64 } 65 66 void Options::enableRestrictedOptions(bool enableOrNot) 67 { 68 restrictedOptionsEnabled = enableOrNot; 69 } 70 67 71 static bool parse(const char* string, bool& value) 68 72 { … … 129 133 { 130 134 if (availability == Availability::Restricted) 131 return allowRestrictedOptions();135 return restrictedOptionsEnabled; 132 136 ASSERT(availability == Availability::Configurable); 133 137 -
trunk/Source/JavaScriptCore/runtime/Options.h
r208897 r209553 507 507 JS_EXPORT_PRIVATE static void ensureOptionsAreCoherent(); 508 508 509 JS_EXPORT_PRIVATE static void enableRestrictedOptions(bool enableOrNot); 510 509 511 // Declare accessors for each option: 510 512 #define FOR_EACH_OPTION(type_, name_, defaultValue_, availability_, description_) \
Note: See TracChangeset
for help on using the changeset viewer.