diff options
author | ggayed | 2011-11-10 21:52:49 +0000 |
---|---|---|
committer | ggayed | 2011-11-10 21:52:49 +0000 |
commit | 55462c1df41d7cdf0deec0bd5da5d2b65496c67a (patch) | |
tree | 1ca3f681be800a4a8e3c0139e6f0688ad9588044 /development/org.eclipse.wst.jsdt.debug.ie | |
parent | 118fdcfd4a174b8a6564ffb7395bf3eb93b81c57 (diff) | |
download | webtools.jsdt.debug-55462c1df41d7cdf0deec0bd5da5d2b65496c67a.tar.gz webtools.jsdt.debug-55462c1df41d7cdf0deec0bd5da5d2b65496c67a.tar.xz webtools.jsdt.debug-55462c1df41d7cdf0deec0bd5da5d2b65496c67a.zip |
fix IE9 missing local vars
Diffstat (limited to 'development/org.eclipse.wst.jsdt.debug.ie')
-rw-r--r-- | development/org.eclipse.wst.jsdt.debug.ie/IECrossfireInstaller/Release/IECrossfireInstaller.msi | bin | 3424768 -> 2460672 bytes | |||
-rw-r--r-- | development/org.eclipse.wst.jsdt.debug.ie/IECrossfireServer/CrossfireContext.cpp | 36 |
2 files changed, 31 insertions, 5 deletions
diff --git a/development/org.eclipse.wst.jsdt.debug.ie/IECrossfireInstaller/Release/IECrossfireInstaller.msi b/development/org.eclipse.wst.jsdt.debug.ie/IECrossfireInstaller/Release/IECrossfireInstaller.msi Binary files differindex cf8857a..b64dbab 100644 --- a/development/org.eclipse.wst.jsdt.debug.ie/IECrossfireInstaller/Release/IECrossfireInstaller.msi +++ b/development/org.eclipse.wst.jsdt.debug.ie/IECrossfireInstaller/Release/IECrossfireInstaller.msi diff --git a/development/org.eclipse.wst.jsdt.debug.ie/IECrossfireServer/CrossfireContext.cpp b/development/org.eclipse.wst.jsdt.debug.ie/IECrossfireServer/CrossfireContext.cpp index 64dd63c..2aae456 100644 --- a/development/org.eclipse.wst.jsdt.debug.ie/IECrossfireServer/CrossfireContext.cpp +++ b/development/org.eclipse.wst.jsdt.debug.ie/IECrossfireServer/CrossfireContext.cpp @@ -922,13 +922,31 @@ bool CrossfireContext::createValueForFrame(IDebugStackFrame* stackFrame, unsigne locals->addObjectValue(KEY_THIS, &value_this2); } + URL url; CComBSTR bstrUrl = NULL; - hr = document->GetName(DOCUMENTNAMETYPE_TITLE, &bstrUrl); - if (FAILED(hr)) { - Logger::error("CrossfireContext.createValueForFrame(): GetName() failed", hr); - return false; + hr = document->GetName(DOCUMENTNAMETYPE_URL, &bstrUrl); + if (SUCCEEDED(hr)) { + url.setString(bstrUrl); + } else { + /* + * Failure to get the URL indicates that the node represents something like a JScript + * block or eval code. For these cases get the node's title instead and prepend a + * scheme to make it url-like. + */ + hr = document->GetName(DOCUMENTNAMETYPE_TITLE, &bstrUrl); + if (FAILED(hr)) { + Logger::error("CrossfireContext.createValueForFrame(): GetName() failed", hr); + return false; + } + + int length = wcslen(SCHEME_SCRIPT) + wcslen(bstrUrl.m_str) + 1; + wchar_t* string = new wchar_t[length]; + ZeroMemory(string, length * sizeof(wchar_t)); + wcscat_s(string, length, SCHEME_SCRIPT); + wcscat_s(string, length, bstrUrl.m_str); + url.setString(string); + delete[] string; } - URL url(bstrUrl); if (!locals) { locals = new Value(); @@ -1018,6 +1036,14 @@ bool CrossfireContext::createValueForObject(JSObject* object, bool resolveChildO return false; } + /* + * Bug in IE9. For some reason the enumPropertyInfo->Next() invocation below fails + * when it is the first invocation on a debug property info enum from a stack frame. + * The workaround is to warm up the enumeration by first getting its count. + */ + ULONG count = 0; + enumPropertyInfo->GetCount(&count); + Value children; children.setType(TYPE_OBJECT); ULONG fetched; |