Просмотр исходного кода

Remove hybrid debugging support

Sandeep Agarwal 9 лет назад
Родитель
Сommit
86f184672f

+ 0 - 2
lib/Common/ConfigFlagsList.h

@@ -414,7 +414,6 @@ PHASE(All)
 #define DEFAULT_CONFIG_Loop                 (1)
 #define DEFAULT_CONFIG_ForceDiagnosticsMode (false)
 #define DEFAULT_CONFIG_EnableJitInDiagMode  (true)
-#define DEFAULT_CONFIG_EnableJitInHybridDebugging (true)
 #define DEFAULT_CONFIG_UseFullName          (true)
 #define DEFAULT_CONFIG_EnableContinueAfterExceptionWrappersForHelpers  (true)
 #define DEFAULT_CONFIG_EnableContinueAfterExceptionWrappersForBuiltIns  (true)
@@ -933,7 +932,6 @@ FLAGNR(Boolean, ForcePostLowerGlobOptInstrString, "Force tracking of globopt ins
 FLAGNR(Boolean, ForceSplitScope       , "All functions will have unmerged body and param scopes", DEFAULT_CONFIG_ForceSplitScope)
 FLAGNR(Boolean, EnumerateSpecialPropertiesInDebugger, "Enable enumeration of special debug properties", DEFAULT_CONFIG_EnumerateSpecialPropertiesInDebugger)
 FLAGNR(Boolean, EnableJitInDiagMode   , "Enable Fast F12 (only applicable with ForceDiagnosticsMode or while under debugger)", DEFAULT_CONFIG_EnableJitInDiagMode)
-FLAGR (Boolean, EnableJitInHybridDebugging, "Enable Fast Debugging for Hybrid Debugging. Node: to turn this ON in full, EnableJitInDiagMode must be ON as well.", DEFAULT_CONFIG_EnableJitInHybridDebugging)
 FLAGNR(Boolean, EnableContinueAfterExceptionWrappersForHelpers, "Enable wrapper over helper methods in debugger, Fast F12 only", DEFAULT_CONFIG_EnableContinueAfterExceptionWrappersForHelpers)
 FLAGNR(Boolean, EnableContinueAfterExceptionWrappersForBuiltIns, "Enable wrapper over library calls in debugger, Fast F12 only", DEFAULT_CONFIG_EnableContinueAfterExceptionWrappersForBuiltIns)
 FLAGNR(Boolean, EnableFunctionSourceReportForHeapEnum, "During HeapEnum, whether to report function source info (url/row/col)", DEFAULT_CONFIG_EnableFunctionSourceReportForHeapEnum)

+ 2 - 17
lib/Common/Core/ConfigFlagsTable.cpp

@@ -6,8 +6,6 @@
 #include "Memory/PageHeapBlockTypeFilter.h"
 
 #include <initguid.h>
-// {17DC713D-8B3E-4434-9DC8-90C275C75194}
-DEFINE_GUID(HybridDebuggingGuid, 0x17dc713d, 0x8b3e, 0x4434, 0x9d, 0xc8, 0x90, 0xc2, 0x75, 0xc7, 0x51, 0x94);
 
 #undef DebugBreak
 
@@ -1170,28 +1168,15 @@ namespace Js
     // Configuration options
     //
 
-    Configuration::Configuration() : isHybridDebugging(false)
+    Configuration::Configuration()
     {
-        if(IsDebuggerPresent())
-        {
-            if(IsEqualGUID(hybridDebuggingGuid, HybridDebuggingGuid))
-            {
-                isHybridDebugging = true;
-            }
-        }
     }
 
     bool Configuration::EnableJitInDebugMode()
     {
-        return (!IsHybridDebugging() || CONFIG_FLAG(EnableJitInHybridDebugging)) && CONFIG_FLAG(EnableJitInDiagMode);
+        return CONFIG_FLAG(EnableJitInDiagMode);
     }
 
-    bool Configuration::IsHybridDebugging()
-    {
-        return isHybridDebugging;
-    }
-
-
     Configuration        Configuration::Global;
 
 

+ 0 - 6
lib/Common/Core/ConfigFlagsTable.h

@@ -502,16 +502,10 @@ namespace Js
         ConfigFlagsTable           flags;
         static Configuration        Global;
         bool EnableJitInDebugMode();
-        bool IsHybridDebugging();
 
         // Public in case the client wants to have
         // a separate config from the global one
         Configuration();
-
-    private:
-        GUID hybridDebuggingGuid; // Set to HybridDebuggingGuid when hybrid debugging - set by the out of process debugging component - jscript9diag.
-                                  // Otherwise, remains un-initialized
-        bool isHybridDebugging;
     };
 
 //Create macros for a useful subset of the config options that either get the value from the configuration (if the option is enabled) or

+ 0 - 4
lib/Parser/rterrors.h

@@ -282,10 +282,6 @@ RT_ERROR_MSG(ASYNCERR_NoErrorInErrorState, 5200, "", "Status is 'error', but get
 RT_ERROR_MSG(ASYNCERR_InvalidStatusArg, 5201, "", "Missing or invalid status parameter passed to completed handler", kjstError, 0)
 RT_ERROR_MSG(ASYNCERR_InvalidSenderArg, 5202, "", "Missing or invalid sender parameter passed to completed handler", kjstError, 0)
 
-// Error messages for hybrid debugging
-RT_ERROR_MSG(DIAGERR_FunctionCallNotSupported, 5400, "", "Function evaluation is disabled while debugging native code", kjstError, 0)
-RT_ERROR_MSG(DIAGERR_EvaluateNotSupported, 5401, "", "Evaluation of the JavaScript expression is not supported while debugging native code", kjstError, 0)
-
 RT_ERROR_MSG(JSERR_InvalidCodePoint, 5600, "Invalid code point %s", "Invalid code point", kjstRangeError, 0)
 RT_ERROR_MSG(JSERR_InvalidNormalizationForm, 5601, "Normalization form '%s' is invalid. Expected one of: ['NFC', 'NFD', 'NFKC', 'NFKD'].", "Invalid normalization form. Expected one of: ['NFC', 'NFD', 'NFKC', 'NFKD']", kjstRangeError, 0)
 RT_ERROR_MSG(JSERR_InvalidUnicodeCharacter, 5602, "Failed to normalize: invalid or missing unicode character at index %d.", "Failed to normalize: invalid or missing unicode character.", kjstRangeError, 0)

+ 1 - 5
lib/Runtime/Base/ScriptContext.cpp

@@ -2741,11 +2741,7 @@ if (!sourceList)
         // Disable QC while functions are re-parsed as this can be time consuming
         AutoDisableInterrupt autoDisableInterrupt(this->threadContext->GetInterruptPoller(), true);
 
-        if ((hr = this->GetDebugContext()->RundownSourcesAndReparse(shouldPerformSourceRundown, /*shouldReparseFunctions*/ true)) == S_OK)
-        {
-            HRESULT hr2 = this->GetLibrary()->EnsureReadyIfHybridDebugging(); // Prepare library if hybrid debugging attach
-            Assert(hr2 != E_FAIL);   // Omitting HRESULT
-        }
+        hr = this->GetDebugContext()->RundownSourcesAndReparse(shouldPerformSourceRundown, /*shouldReparseFunctions*/ true);
 
         // Debugger attach/detach failure is catastrophic, take down the process
         DEBUGGER_ATTACHDETACH_FATAL_ERROR_IF_FAILED(hr);

+ 0 - 1
lib/Runtime/Base/Utf8SourceInfo.h

@@ -45,7 +45,6 @@ namespace Js
             return (this->debugModeSource != nullptr || this->debugModeSourceIsEmpty) && this->m_isInDebugMode;
         }
 
-        // For Hybrid debugging purposes we need to have the source mapped in because chakra may be in a frozen state when the source would be needed.
         void SetInDebugMode(bool inDebugMode)
         {
             AssertMsg(!GetIsLibraryCode(), "Shouldn't call SetInDebugMode for Library code.");

+ 1 - 11
lib/Runtime/Debug/ProbeContainer.cpp

@@ -530,17 +530,7 @@ namespace Js
                     }
                 });
 
-                if (localPendingProbeList->Count() == 0)
-                {
-                    // The breakpoint could have been initiated by hybrid debugging
-                    if (Js::Configuration::Global.IsHybridDebugging())
-                    {
-                        debugManager->stepController.Deactivate(pHaltState);
-                        debugManager->asyncBreakController.Deactivate();
-                        haltCallbackProbe->DispatchHalt(pHaltState);
-                    }
-                }
-                else
+                if (localPendingProbeList->Count() != 0)
                 {
                     localPendingProbeList->MapUntil([&](int index, Probe * probe)
                     {

+ 18 - 179
lib/Runtime/Library/JavascriptLibrary.cpp

@@ -74,10 +74,6 @@ namespace Js
 
         typesEnsuredToHaveOnlyWritableDataPropertiesInItAndPrototypeChain = RecyclerNew(recycler, JsUtil::List<Type *>, recycler);
 
-        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-        // WARNING: Any objects created here using DeferredTypeHandler need to appear in EnsureLibraryReadyForHybridDebugging
-        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
         // Library is not zero-initialized. memset the memory occupied by builtinFunctions array to 0.
         memset(builtinFunctions, 0, sizeof(JavascriptFunction *) * BuiltinFunction::Count);
 
@@ -96,10 +92,6 @@ namespace Js
         InitializeComplexThings();
         InitializeStaticValues();
 
-        // Do an early check of hybrid debugging. Note that script engine is not ready, so objects that run script in initializer
-        // can't be un-deferred yet. However, we can possibly mark isHybridDebugging and avoid deferring new runtime objects.
-        EnsureReadyIfHybridDebugging(/*isScriptEngineReady*/false);
-
 #if ENABLE_COPYONACCESS_ARRAY
         if (!PHASE_OFF1(CopyOnAccessArrayPhase))
         {
@@ -130,10 +122,6 @@ namespace Js
 
         ArrayBuffer* baseArrayBuffer;
 
-        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-        // WARNING: Any objects here using DeferredTypeHandler need to appear in EnsureLibraryReadyForHybridDebugging
-        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
         // The prototype property of the object prototype is null.
         objectPrototype = ObjectPrototypeObject::New(recycler,
             DynamicType::New(scriptContext, TypeIds_Object, nullValue, nullptr,
@@ -1111,10 +1099,6 @@ namespace Js
 
     void JavascriptLibrary::InitializeGlobal(GlobalObject * globalObject)
     {
-        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-        // WARNING: Any objects here using DeferredTypeHandler need to appear in EnsureLibraryReadyForHybridDebugging
-        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
         RecyclableObject* globalObjectPrototype = GetObjectPrototype();
         globalObject->SetPrototype(globalObjectPrototype);
         Recycler * recycler = this->GetRecycler();
@@ -3262,151 +3246,6 @@ namespace Js
 #endif
     }
 
-    //
-    // Ensure library ready if started hybrid debugging. Call this to support hybrid debugging when engine starts debug mode.
-    //
-    HRESULT JavascriptLibrary::EnsureReadyIfHybridDebugging(bool isScriptEngineReady /*= true*/)
-    {
-        HRESULT hr = S_OK;
-
-        this->isHybridDebugging = Js::Configuration::Global.IsHybridDebugging();
-
-        // If just started hybrid debugging, ensure library objects ready (but only if we can run script now)
-        if (this->isHybridDebugging && !this->isLibraryReadyForHybridDebugging && isScriptEngineReady)
-        {
-            BEGIN_JS_RUNTIME_CALL_EX_AND_TRANSLATE_EXCEPTION_AND_ERROROBJECT_TO_HRESULT_NESTED(scriptContext, /*doCleanup*/false)
-            {
-                EnsureLibraryReadyForHybridDebugging();
-            }
-            END_JS_RUNTIME_CALL_AND_TRANSLATE_EXCEPTION_AND_ERROROBJECT_TO_HRESULT(hr)
-        }
-
-        return hr;
-    }
-
-    //
-    // If under hybrid debugging, ensure one object ready (not using deferred type handler).
-    //
-    DynamicObject* JavascriptLibrary::EnsureReadyIfHybridDebugging(DynamicObject* obj)
-    {
-        if (IsHybridDebugging())
-        {
-            Assert(!obj->GetScriptContext()->GetThreadContext()->IsDisableImplicitCall());
-            if (!obj->GetTypeHandler()->EnsureObjectReady(obj))
-            {
-                return obj;
-            }
-        }
-        return obj;
-    }
-
-    //
-    // When starting hybrid debugging, ensure all library objects ready (not using deferred type handler).
-    //
-    void JavascriptLibrary::EnsureLibraryReadyForHybridDebugging()
-    {
-        Assert(IsHybridDebugging() && !isLibraryReadyForHybridDebugging);
-
-        // Note: List all library objects that use DeferredTypeHandler
-        DynamicObject* objects[] =
-        {
-            this->objectPrototype,
-            this->arrayPrototype,
-            this->arrayBufferPrototype,
-            this->dataViewPrototype,
-            this->typedArrayPrototype,
-            this->Int8ArrayPrototype,
-            this->Uint8ArrayPrototype,
-            this->Uint8ClampedArrayPrototype,
-            this->Int16ArrayPrototype,
-            this->Uint16ArrayPrototype,
-            this->Int32ArrayPrototype,
-            this->Uint32ArrayPrototype,
-            this->Float32ArrayPrototype,
-            this->Float64ArrayPrototype,
-            this->Int64ArrayPrototype,
-            this->Uint64ArrayPrototype,
-            this->BoolArrayPrototype,
-            this->CharArrayPrototype,
-            this->booleanPrototype,
-            this->datePrototype,
-            this->functionPrototype,
-            this->numberPrototype,
-            this->stringPrototype,
-            this->mapPrototype,
-            this->setPrototype,
-            this->weakMapPrototype,
-            this->weakSetPrototype,
-            this->regexPrototype,
-            this->symbolPrototype,
-            this->arrayIteratorPrototype,
-            this->promisePrototype,
-            this->javascriptEnumeratorIteratorPrototype,
-            this->generatorFunctionPrototype,
-            this->generatorPrototype,
-            this->errorPrototype,
-            this->evalErrorPrototype,
-            this->rangeErrorPrototype,
-            this->referenceErrorPrototype,
-            this->syntaxErrorPrototype,
-            this->typeErrorPrototype,
-            this->uriErrorPrototype,
-            this->objectConstructor,
-            this->arrayConstructor,
-            this->booleanConstructor,
-            this->dateConstructor,
-            this->functionConstructor,
-            this->debugObject,
-            this->mathObject,
-            this->numberConstructor,
-            this->stringConstructor,
-            this->regexConstructor,
-            this->arrayBufferConstructor,
-            this->dataViewConstructor,
-            this->typedArrayConstructor,
-            this->Int8ArrayConstructor,
-            this->Uint8ArrayConstructor,
-            this->Uint8ClampedArrayConstructor,
-            this->Int16ArrayConstructor,
-            this->Uint16ArrayConstructor,
-            this->Int32ArrayConstructor,
-            this->Uint32ArrayConstructor,
-            this->Float32ArrayConstructor,
-            this->Float64ArrayConstructor,
-            this->JSONObject,
-#ifdef ENABLE_INTL_OBJECT
-            this->IntlObject,
-#endif
-            this->mapConstructor,
-            this->setConstructor,
-            this->weakMapConstructor,
-            this->weakSetConstructor,
-            this->symbolConstructor,
-            this->promiseConstructor,
-            this->proxyConstructor,
-            this->generatorFunctionConstructor,
-            this->asyncFunctionConstructor,
-            this->errorConstructor,
-            this->evalErrorConstructor,
-            this->rangeErrorConstructor,
-            this->referenceErrorConstructor,
-            this->syntaxErrorConstructor,
-            this->typeErrorConstructor,
-            this->uriErrorConstructor,
-        };
-
-        Assert(!scriptContext->GetThreadContext()->IsDisableImplicitCall());
-        for (int i = 0; i < _countof(objects); i++)
-        {
-            if (objects[i]) // may be NULL for compat mode
-            {
-                objects[i]->GetTypeHandler()->EnsureObjectReady(objects[i]);
-            }
-        }
-
-        isLibraryReadyForHybridDebugging = true;
-    }
-
     // Note: This function is only used in float preferencing scenarios. Should remove it once we do away with float preferencing.
 
     // Cases like,
@@ -5010,7 +4849,7 @@ namespace Js
     JavascriptExternalFunction*
     JavascriptLibrary::CreateExternalFunction(ExternalMethod entryPoint, Var nameId, Var signature, JavascriptTypeId prototypeTypeId, UINT64 flags)
     {
-        JavascriptExternalFunction* function = EnsureReadyIfHybridDebugging(this->CreateIdMappedExternalFunction(entryPoint, externalFunctionWithDeferredPrototypeType));
+        JavascriptExternalFunction* function = this->CreateIdMappedExternalFunction(entryPoint, externalFunctionWithDeferredPrototypeType);
         function->SetPrototypeTypeId(prototypeTypeId);
         function->SetExternalFlags(flags);
         function->SetFunctionNameId(nameId);
@@ -5670,7 +5509,7 @@ namespace Js
     {
         FunctionInfo* functionInfo = RecyclerNew(this->GetRecycler(), FunctionInfo, entryPoint);
         DynamicType* type = CreateDeferredPrototypeFunctionType(this->inDispatchProfileMode ? ProfileEntryThunk : entryPoint);
-        JavascriptPromiseAsyncSpawnExecutorFunction* function = EnsureReadyIfHybridDebugging(RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptPromiseAsyncSpawnExecutorFunction, type, functionInfo, generatorFunction, target));
+        JavascriptPromiseAsyncSpawnExecutorFunction* function = RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptPromiseAsyncSpawnExecutorFunction, type, functionInfo, generatorFunction, target);
 
         return function;
     }
@@ -5679,7 +5518,7 @@ namespace Js
     {
         FunctionInfo* functionInfo = RecyclerNew(this->GetRecycler(), FunctionInfo, entryPoint);
         DynamicType* type = CreateDeferredPrototypeFunctionType(this->inDispatchProfileMode ? ProfileEntryThunk : entryPoint);
-        JavascriptPromiseAsyncSpawnStepArgumentExecutorFunction* function = EnsureReadyIfHybridDebugging(RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptPromiseAsyncSpawnStepArgumentExecutorFunction, type, functionInfo, generator, argument, resolve, reject, isReject));
+        JavascriptPromiseAsyncSpawnStepArgumentExecutorFunction* function = RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptPromiseAsyncSpawnStepArgumentExecutorFunction, type, functionInfo, generator, argument, resolve, reject, isReject);
 
         return function;
     }
@@ -5822,33 +5661,33 @@ namespace Js
     JavascriptFunction* JavascriptLibrary::CreateNonProfiledFunction(FunctionInfo * functionInfo)
     {
         Assert(functionInfo->GetAttributes() & FunctionInfo::DoNotProfile);
-        return EnsureReadyIfHybridDebugging(RecyclerNew(this->GetRecycler(), RuntimeFunction,
+        return RecyclerNew(this->GetRecycler(), RuntimeFunction,
             CreateDeferredPrototypeFunctionTypeNoProfileThunk(functionInfo->GetOriginalEntryPoint()),
-            functionInfo));
+            functionInfo);
     }
 
     ScriptFunction* JavascriptLibrary::CreateScriptFunction(FunctionProxy * proxy)
     {
         ScriptFunctionType* deferredPrototypeType = proxy->EnsureDeferredPrototypeType();
-        return EnsureReadyIfHybridDebugging(RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, ScriptFunction, proxy, deferredPrototypeType));
+        return RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, ScriptFunction, proxy, deferredPrototypeType);
     }
 
     AsmJsScriptFunction* JavascriptLibrary::CreateAsmJsScriptFunction(FunctionProxy * proxy)
     {
         ScriptFunctionType* deferredPrototypeType = proxy->EnsureDeferredPrototypeType();
-        return EnsureReadyIfHybridDebugging(RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, AsmJsScriptFunction, proxy, deferredPrototypeType));
+        return RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, AsmJsScriptFunction, proxy, deferredPrototypeType);
     }
 
     ScriptFunctionWithInlineCache* JavascriptLibrary::CreateScriptFunctionWithInlineCache(FunctionProxy * proxy)
     {
         ScriptFunctionType* deferredPrototypeType = proxy->EnsureDeferredPrototypeType();
-        return EnsureReadyIfHybridDebugging(RecyclerNewWithInfoBits(this->GetRecycler(), (Memory::ObjectInfoBits)(EnumFunctionClass | Memory::FinalizableObjectBits), ScriptFunctionWithInlineCache, proxy, deferredPrototypeType));
+        return RecyclerNewWithInfoBits(this->GetRecycler(), (Memory::ObjectInfoBits)(EnumFunctionClass | Memory::FinalizableObjectBits), ScriptFunctionWithInlineCache, proxy, deferredPrototypeType);
     }
 
     GeneratorVirtualScriptFunction* JavascriptLibrary::CreateGeneratorVirtualScriptFunction(FunctionProxy * proxy)
     {
         ScriptFunctionType* deferredPrototypeType = proxy->EnsureDeferredPrototypeType();
-        return EnsureReadyIfHybridDebugging(RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, GeneratorVirtualScriptFunction, proxy, deferredPrototypeType));
+        return RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, GeneratorVirtualScriptFunction, proxy, deferredPrototypeType);
     }
 
     DynamicType * JavascriptLibrary::CreateGeneratorType(RecyclableObject* prototype)
@@ -5859,7 +5698,7 @@ namespace Js
     template <class MethodType>
     JavascriptExternalFunction* JavascriptLibrary::CreateIdMappedExternalFunction(MethodType entryPoint, DynamicType *pPrototypeType)
     {
-        return EnsureReadyIfHybridDebugging(RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptExternalFunction, entryPoint, pPrototypeType));
+        return RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptExternalFunction, entryPoint, pPrototypeType);
     }
 
     JavascriptGeneratorFunction* JavascriptLibrary::CreateGeneratorFunction(JavascriptMethod entryPoint, GeneratorVirtualScriptFunction* scriptFunction)
@@ -5868,7 +5707,7 @@ namespace Js
 
         DynamicType* type = CreateDeferredPrototypeGeneratorFunctionType(entryPoint, scriptFunction->IsAnonymousFunction());
 
-        return EnsureReadyIfHybridDebugging(RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptGeneratorFunction, type, scriptFunction));
+        return RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptGeneratorFunction, type, scriptFunction);
     }
 
     JavascriptExternalFunction* JavascriptLibrary::CreateStdCallExternalFunction(StdCallJavascriptMethod entryPoint, PropertyId nameId, void *callbackState)
@@ -5879,7 +5718,7 @@ namespace Js
 
     JavascriptExternalFunction* JavascriptLibrary::CreateStdCallExternalFunction(StdCallJavascriptMethod entryPoint, Var nameId, void *callbackState)
     {
-        JavascriptExternalFunction* function = EnsureReadyIfHybridDebugging(this->CreateIdMappedExternalFunction(entryPoint, stdCallFunctionWithDeferredPrototypeType));
+        JavascriptExternalFunction* function = this->CreateIdMappedExternalFunction(entryPoint, stdCallFunctionWithDeferredPrototypeType);
         function->SetFunctionNameId(nameId);
         function->SetCallbackState(callbackState);
 
@@ -5892,7 +5731,7 @@ namespace Js
 
         FunctionInfo* functionInfo = &Js::JavascriptPromise::EntryInfo::CapabilitiesExecutorFunction;
         DynamicType* type = DynamicType::New(scriptContext, TypeIds_Function, functionPrototype, entryPoint, GetDeferredAnonymousFunctionTypeHandler());        
-        JavascriptPromiseCapabilitiesExecutorFunction* function = EnsureReadyIfHybridDebugging(RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptPromiseCapabilitiesExecutorFunction, type, functionInfo, capability));
+        JavascriptPromiseCapabilitiesExecutorFunction* function = RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptPromiseCapabilitiesExecutorFunction, type, functionInfo, capability);
 
         function->SetPropertyWithAttributes(PropertyIds::length, TaggedInt::ToVarUnchecked(2), PropertyConfigurable, nullptr);
 
@@ -5905,7 +5744,7 @@ namespace Js
 
         FunctionInfo* functionInfo = &Js::JavascriptPromise::EntryInfo::ResolveOrRejectFunction;
         DynamicType* type = DynamicType::New(scriptContext, TypeIds_Function, functionPrototype, entryPoint, GetDeferredAnonymousFunctionTypeHandler());
-        JavascriptPromiseResolveOrRejectFunction* function = EnsureReadyIfHybridDebugging(RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptPromiseResolveOrRejectFunction, type, functionInfo, promise, isReject, alreadyResolvedRecord));
+        JavascriptPromiseResolveOrRejectFunction* function = RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptPromiseResolveOrRejectFunction, type, functionInfo, promise, isReject, alreadyResolvedRecord);
 
         function->SetPropertyWithAttributes(PropertyIds::length, TaggedInt::ToVarUnchecked(1), PropertyConfigurable, nullptr);
 
@@ -5919,7 +5758,7 @@ namespace Js
         FunctionInfo* functionInfo = RecyclerNew(this->GetRecycler(), FunctionInfo, entryPoint);
         DynamicType* type = CreateDeferredPrototypeFunctionType(entryPoint);
 
-        return EnsureReadyIfHybridDebugging(RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptPromiseReactionTaskFunction, type, functionInfo, reaction, argument));
+        return RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptPromiseReactionTaskFunction, type, functionInfo, reaction, argument);
     }
 
     JavascriptPromiseResolveThenableTaskFunction* JavascriptLibrary::CreatePromiseResolveThenableTaskFunction(JavascriptMethod entryPoint, JavascriptPromise* promise, RecyclableObject* thenable, RecyclableObject* thenFunction)
@@ -5929,7 +5768,7 @@ namespace Js
         FunctionInfo* functionInfo = RecyclerNew(this->GetRecycler(), FunctionInfo, entryPoint);
         DynamicType* type = CreateDeferredPrototypeFunctionType(entryPoint);
 
-        return EnsureReadyIfHybridDebugging(RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptPromiseResolveThenableTaskFunction, type, functionInfo, promise, thenable, thenFunction));
+        return RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptPromiseResolveThenableTaskFunction, type, functionInfo, promise, thenable, thenFunction);
     }
 
     JavascriptPromiseAllResolveElementFunction* JavascriptLibrary::CreatePromiseAllResolveElementFunction(JavascriptMethod entryPoint, uint32 index, JavascriptArray* values, JavascriptPromiseCapability* capabilities, JavascriptPromiseAllResolveElementFunctionRemainingElementsWrapper* remainingElements)
@@ -5938,7 +5777,7 @@ namespace Js
 
         FunctionInfo* functionInfo = &Js::JavascriptPromise::EntryInfo::AllResolveElementFunction;
         DynamicType* type = DynamicType::New(scriptContext, TypeIds_Function, functionPrototype, entryPoint, GetDeferredAnonymousFunctionTypeHandler());
-        JavascriptPromiseAllResolveElementFunction* function = EnsureReadyIfHybridDebugging(RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptPromiseAllResolveElementFunction, type, functionInfo, index, values, capabilities, remainingElements));
+        JavascriptPromiseAllResolveElementFunction* function = RecyclerNewEnumClass(this->GetRecycler(), EnumFunctionClass, JavascriptPromiseAllResolveElementFunction, type, functionInfo, index, values, capabilities, remainingElements);
 
         function->SetPropertyWithAttributes(PropertyIds::length, TaggedInt::ToVarUnchecked(1), PropertyConfigurable, nullptr);
 
@@ -5948,7 +5787,7 @@ namespace Js
     JavascriptExternalFunction* JavascriptLibrary::CreateWrappedExternalFunction(JavascriptExternalFunction* wrappedFunction)
     {
         // The wrapped function will have profiling, so the wrapper function does not need it.
-        JavascriptExternalFunction* function = EnsureReadyIfHybridDebugging(RecyclerNew(this->GetRecycler(), JavascriptExternalFunction, wrappedFunction, wrappedFunctionWithDeferredPrototypeType));
+        JavascriptExternalFunction* function = RecyclerNew(this->GetRecycler(), JavascriptExternalFunction, wrappedFunction, wrappedFunctionWithDeferredPrototypeType);
         function->SetFunctionNameId(wrappedFunction->GetSourceString());
 
         return function;

+ 0 - 16
lib/Runtime/Library/JavascriptLibrary.h

@@ -471,18 +471,6 @@ namespace Js
         template <size_t N>
         JavascriptFunction * AddFunctionToLibraryObjectWithPropertyName(DynamicObject* object, const char16(&propertyName)[N], FunctionInfo * functionInfo, int length);
 
-        bool isHybridDebugging; // If this library is in hybrid debugging mode
-        bool isLibraryReadyForHybridDebugging; // If this library is ready for hybrid debugging (library objects using deferred type handler have been un-deferred)
-
-        bool IsHybridDebugging() const { return isHybridDebugging; }
-        void EnsureLibraryReadyForHybridDebugging();
-        DynamicObject* EnsureReadyIfHybridDebugging(DynamicObject* obj);
-        template <class T> T* EnsureReadyIfHybridDebugging(T* obj)
-        {
-            DynamicObject * dynamicObject = obj;
-            return (T*)EnsureReadyIfHybridDebugging(dynamicObject);
-        }
-
         static SimpleTypeHandler<1> SharedPrototypeTypeHandler;
         static SimpleTypeHandler<1> SharedFunctionWithoutPrototypeTypeHandler;
         static SimpleTypeHandler<1> SharedFunctionWithPrototypeTypeHandlerV11;
@@ -523,8 +511,6 @@ namespace Js
 #if ENABLE_COPYONACCESS_ARRAY
                               cacheForCopyOnAccessArraySegments(nullptr),
 #endif
-                              isHybridDebugging(false),
-                              isLibraryReadyForHybridDebugging(false),
                               referencedPropertyRecords(nullptr),
                               stringTemplateCallsiteObjectList(nullptr),
                               moduleRecordList(nullptr),
@@ -1066,8 +1052,6 @@ namespace Js
 
         static bool ArrayIteratorPrototypeHasUserDefinedNext(ScriptContext *scriptContext);
 
-        HRESULT EnsureReadyIfHybridDebugging(bool isScriptEngineReady = true);
-
         CharStringCache& GetCharStringCache() { return charStringCache;  }
         static JavascriptLibrary * FromCharStringCache(CharStringCache * cache)
         {