NS_IMETHODIMP nsHtml5Parser::Parse(nsIURI* aURL, nsIRequestObserver* aObserver, void* aKey, // legacy; ignored nsDTDMode aMode) // legacy; ignored { /* * Do NOT cause WillBuildModel to be called synchronously from here! * The document won't be ready for it until OnStartRequest! */ NS_PRECONDITION(!mExecutor->HasStarted(), "Tried to start parse without initializing the parser."); NS_PRECONDITION(mStreamParser, "Can't call this Parse() variant on script-created parser"); mStreamParser->SetObserver(aObserver); mStreamParser->SetViewSourceTitle(aURL); // In case we're viewing source mExecutor->SetStreamParser(mStreamParser); mExecutor->SetParser(this); return NS_OK; }
// --------------------------------------------------------------------------- // CMMCScBkupState::ExecuteL() // // // --------------------------------------------------------------------------- void CMMCScBkupState::ExecuteL(TRequestStatus& aObserver) { SetObserver(aObserver); TRAPD(error, PerformStateInitL()); // If the object is active, then it is making use of asynchronous // functionality, in which case we do nothing. // // If the object is not active or the call to PerformStateActionL left, // then we complete the observer with the result of the trap if (error != KErrNone || IsActive() == EFalse) { if (error == KErrNone) { PerformLastRightsL(); } // CompleteObserver(error); } }