/*
  * This method is called by WebCore to inform the frame that
  * the Javascript window object has been cleared.
  * We should re-attach any attached js interfaces.
  */
 private void windowObjectCleared(int nativeFramePointer) {
   if (mJSInterfaceMap != null) {
     Iterator iter = mJSInterfaceMap.keySet().iterator();
     while (iter.hasNext()) {
       String interfaceName = (String) iter.next();
       nativeAddJavascriptInterface(
           nativeFramePointer, mJSInterfaceMap.get(interfaceName), interfaceName);
     }
   }
 }
 /*
  * This method is called by WebCore to inform the frame that
  * the Javascript window object has been cleared.
  * We should re-attach any attached js interfaces.
  */
 private void windowObjectCleared(int nativeFramePointer) {
   Iterator<String> iter = mJavaScriptObjects.keySet().iterator();
   while (iter.hasNext()) {
     String interfaceName = iter.next();
     JSObject jsobject = mJavaScriptObjects.get(interfaceName);
     if (jsobject != null && jsobject.object != null) {
       nativeAddJavascriptInterface(
           nativeFramePointer, jsobject.object, interfaceName, jsobject.requireAnnotation);
     }
   }
   mRemovedJavaScriptObjects.clear();
 }
  /*
   * This method is called by WebCore to inform the frame that
   * the Javascript window object has been cleared.
   * We should re-attach any attached js interfaces.
   */
  private void windowObjectCleared(int nativeFramePointer) {
    Iterator<String> iter = mJavaScriptObjects.keySet().iterator();
    while (iter.hasNext()) {
      String interfaceName = iter.next();
      Object object = mJavaScriptObjects.get(interfaceName);
      if (object != null) {
        nativeAddJavascriptInterface(
            nativeFramePointer, mJavaScriptObjects.get(interfaceName), interfaceName);
      }
    }
    mRemovedJavaScriptObjects.clear();

    stringByEvaluatingJavaScriptFromString(SearchBoxImpl.JS_BRIDGE);
  }