if (nsnull != mInstance) { #if defined(XP_MAC)  mPluginTimer = do_CreateInstance("@mozilla.org/timer;1", &rv); if (rv == NS_OK) rv = mPluginTimer->InitWithCallback(this, 1020 / 60, nsITimer::TYPE_REPEATING_SLACK); #endif
if (nsnull != mInstance) {
NS_IMETHODIMP pluginInstanceOwner :: CreateWidget(void){  NS_ENSURE_TRUE(mPluginWindow, NS_ERROR_NULL_POINTER);  PRBool    windowless;  nsresult  rv = NS_OK;    if (nsnull != mInstance)  {#if defined(XP_MAC)          // start a periodic timer to provide null events to the plugin instance.          mPluginTimer = do_CreateInstance("@mozilla.org/timer;1", &rv);          if (rv == NS_OK)            rv = mPluginTimer->InitWithCallback(this, 1020 / 60, nsITimer::TYPE_REPEATING_SLACK);#endif    mInstance->GetValue(nsPluginInstanceVariable_WindowlessBool, (void *)&windowless);    if (PR_TRUE == windowless)    {      mPluginWindow->window = nsnull;    //XXX this needs to be a HDC      mPluginWindow->type = nsPluginWindowType_Drawable;    }    else if (nsnull != mWindow)    {      mPluginWindow->window = (nsPluginPort *)mWindow->GetNativeData(NS_NATIVE_PLUGIN_PORT);      mPluginWindow->type = nsPluginWindowType_Window;    }    else      return NS_ERROR_FAILURE;  }  else    return NS_ERROR_FAILURE;#if defined(XP_MAC)  FixUpPluginWindow();#endif  return rv;}