| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 return; | 826 return; |
| 827 | 827 |
| 828 ScriptState::Scope scope(scriptState); | 828 ScriptState::Scope scope(scriptState); |
| 829 | 829 |
| 830 (*s_installOriginTrialsFunction)(scriptState); | 830 (*s_installOriginTrialsFunction)(scriptState); |
| 831 | 831 |
| 832 // Mark each enabled feature as having been installed. | 832 // Mark each enabled feature as having been installed. |
| 833 if (!originTrialContext->featureBindingsInstalled("DurableStorage") && (Runt
imeEnabledFeatures::durableStorageEnabled() || originTrialContext->isFeatureEnab
led("DurableStorage", nullptr))) { | 833 if (!originTrialContext->featureBindingsInstalled("DurableStorage") && (Runt
imeEnabledFeatures::durableStorageEnabled() || originTrialContext->isFeatureEnab
led("DurableStorage", nullptr))) { |
| 834 originTrialContext->setFeatureBindingsInstalled("DurableStorage"); | 834 originTrialContext->setFeatureBindingsInstalled("DurableStorage"); |
| 835 } | 835 } |
| 836 |
| 837 if (!originTrialContext->featureBindingsInstalled("WebBluetooth") && (Runtim
eEnabledFeatures::webBluetoothEnabled() || originTrialContext->isFeatureEnabled(
"WebBluetooth", nullptr))) { |
| 838 originTrialContext->setFeatureBindingsInstalled("WebBluetooth"); |
| 839 } |
| 836 } | 840 } |
| 837 | 841 |
| 838 InstallOriginTrialsFunction setInstallOriginTrialsFunction(InstallOriginTrialsFu
nction newInstallOriginTrialsFunction) | 842 InstallOriginTrialsFunction setInstallOriginTrialsFunction(InstallOriginTrialsFu
nction newInstallOriginTrialsFunction) |
| 839 { | 843 { |
| 840 InstallOriginTrialsFunction originalFunction = s_installOriginTrialsFunction
; | 844 InstallOriginTrialsFunction originalFunction = s_installOriginTrialsFunction
; |
| 841 s_installOriginTrialsFunction = newInstallOriginTrialsFunction; | 845 s_installOriginTrialsFunction = newInstallOriginTrialsFunction; |
| 842 return originalFunction; | 846 return originalFunction; |
| 843 } | 847 } |
| 844 | 848 |
| 845 void crashIfIsolateIsDead(v8::Isolate* isolate) | 849 void crashIfIsolateIsDead(v8::Isolate* isolate) |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); | 948 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); |
| 945 } | 949 } |
| 946 | 950 |
| 947 v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value> value, v8::Isolate* iso
late) | 951 v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value> value, v8::Isolate* iso
late) |
| 948 { | 952 { |
| 949 v8CallOrCrash(value.As<v8::Object>()->SetIntegrityLevel(isolate->GetCurrentC
ontext(), v8::IntegrityLevel::kFrozen)); | 953 v8CallOrCrash(value.As<v8::Object>()->SetIntegrityLevel(isolate->GetCurrentC
ontext(), v8::IntegrityLevel::kFrozen)); |
| 950 return value; | 954 return value; |
| 951 } | 955 } |
| 952 | 956 |
| 953 } // namespace blink | 957 } // namespace blink |
| OLD | NEW |