More diagnostics for methods called from the wrong thread

- Add checkThread for constructor
- Throw Exception from both threads

BUG 10428080

Change-Id: Iea350f541953c8af00217acd6f1c93a5f57fd6e3
diff --git a/chromium/java/com/android/webview/chromium/WebViewChromium.java b/chromium/java/com/android/webview/chromium/WebViewChromium.java
index ec5c1cc..1fadc35 100644
--- a/chromium/java/com/android/webview/chromium/WebViewChromium.java
+++ b/chromium/java/com/android/webview/chromium/WebViewChromium.java
@@ -101,6 +101,7 @@
 
     public WebViewChromium(WebView webView, WebView.PrivateAccess webViewPrivate,
             AwBrowserContext browserContext) {
+        checkThread();
         mWebView = webView;
         mWebViewPrivate = webViewPrivate;
         mHitTestResult = new WebView.HitTestResult();
@@ -161,6 +162,7 @@
                     throw threadViolation;
                 }
             });
+            throw createThreadException();
         }
     }