Skip to content

Commit

Permalink
fix regression in 109_hello_world_debug
Browse files Browse the repository at this point in the history
  • Loading branch information
tjanczuk committed May 6, 2013
1 parent c4139ad commit be657de
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/iisnode/cnodeapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ HRESULT CNodeApplication::Dispatch(IHttpContext* context, IHttpEventProvider* pP
CheckNull(context);
CheckNull(pProvider);

ErrorIf(NULL == (*ctx = new CNodeHttpStoredContext(this, context)), ERROR_NOT_ENOUGH_MEMORY);
ErrorIf(NULL == (*ctx = new CNodeHttpStoredContext(this, this->GetApplicationManager()->GetEventProvider(), context)), ERROR_NOT_ENOUGH_MEMORY);
IHttpModuleContextContainer* moduleContextContainer = context->GetModuleContextContainer();
moduleContextContainer->SetModuleContext(*ctx, this->GetApplicationManager()->GetModuleId());

Expand Down
4 changes: 2 additions & 2 deletions src/iisnode/cnodeapplicationmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ HRESULT CNodeApplicationManager::DebugRedirect(IHttpContext* context, CNodeHttpS
{
HRESULT hr;

ErrorIf(NULL == (*ctx = new CNodeHttpStoredContext(NULL, context)), ERROR_NOT_ENOUGH_MEMORY);
ErrorIf(NULL == (*ctx = new CNodeHttpStoredContext(NULL, this->GetEventProvider(), context)), ERROR_NOT_ENOUGH_MEMORY);
IHttpModuleContextContainer* moduleContextContainer = context->GetModuleContextContainer();
moduleContextContainer->SetModuleContext(*ctx, this->GetModuleId());
(*ctx)->IncreasePendingAsyncOperationCount(); // will be decreased in CProtocolBridge::FinalizeResponseCore
Expand All @@ -278,7 +278,7 @@ HRESULT CNodeApplicationManager::EnsureDebuggedApplicationKilled(IHttpContext* c

if (ctx)
{
ErrorIf(NULL == (*ctx = new CNodeHttpStoredContext(NULL, context)), ERROR_NOT_ENOUGH_MEMORY);
ErrorIf(NULL == (*ctx = new CNodeHttpStoredContext(NULL, this->GetEventProvider(), context)), ERROR_NOT_ENOUGH_MEMORY);
IHttpModuleContextContainer* moduleContextContainer = context->GetModuleContextContainer();
moduleContextContainer->SetModuleContext(*ctx, this->GetModuleId());
(*ctx)->SetRequestNotificationStatus(RQ_NOTIFICATION_CONTINUE);
Expand Down
6 changes: 3 additions & 3 deletions src/iisnode/cnodehttpstoredcontext.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "precomp.h"

CNodeHttpStoredContext::CNodeHttpStoredContext(CNodeApplication* nodeApplication, IHttpContext* context)
CNodeHttpStoredContext::CNodeHttpStoredContext(CNodeApplication* nodeApplication, CNodeEventProvider* eventProvider, IHttpContext* context)
: nodeApplication(nodeApplication), context(context), process(NULL), buffer(NULL), bufferSize(0), dataSize(0), parsingOffset(0),
chunkLength(0), chunkTransmitted(0), isChunked(FALSE), pipe(INVALID_HANDLE_VALUE), result(S_OK), isLastChunk(FALSE),
requestNotificationStatus(RQ_NOTIFICATION_PENDING), connectionRetryCount(0), pendingAsyncOperationCount(1),
Expand All @@ -18,7 +18,7 @@ CNodeHttpStoredContext::CNodeHttpStoredContext(CNodeApplication* nodeApplication
CoCreateGuid(&this->activityId);

this->asyncContext.data = this;
this->eventProvider = nodeApplication->GetApplicationManager()->GetEventProvider();
this->eventProvider = eventProvider;
}

CNodeHttpStoredContext::~CNodeHttpStoredContext()
Expand Down Expand Up @@ -378,7 +378,7 @@ HRESULT CNodeHttpStoredContext::SetupUpgrade()
// both contexts are used concurrently in a full duplex, asynchronous fashion.
// The last context to complete pumping closes the IIS request.

ErrorIf(NULL == (this->upgradeContext = new CNodeHttpStoredContext(this->GetNodeApplication(), this->GetHttpContext())),
ErrorIf(NULL == (this->upgradeContext = new CNodeHttpStoredContext(this->GetNodeApplication(), this->eventProvider, this->GetHttpContext())),
ERROR_NOT_ENOUGH_MEMORY);
this->upgradeContext->bufferSize = CModuleConfiguration::GetInitialRequestBufferSize(this->context);
ErrorIf(NULL == (this->upgradeContext->buffer = this->context->AllocateRequestMemory(this->upgradeContext->bufferSize)),
Expand Down
2 changes: 1 addition & 1 deletion src/iisnode/cnodehttpstoredcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class CNodeHttpStoredContext : public IHttpStoredContext
public:

// Context is owned by the caller
CNodeHttpStoredContext(CNodeApplication* nodeApplication, IHttpContext* context);
CNodeHttpStoredContext(CNodeApplication* nodeApplication, CNodeEventProvider* eventProvider, IHttpContext* context);
~CNodeHttpStoredContext();

IHttpContext* GetHttpContext();
Expand Down

0 comments on commit be657de

Please sign in to comment.