Merge from Chromium at DEPS revision r213057

This commit was generated by merge_to_master.py.

Change-Id: If0dbdee1edae80ae428c081eb0ecd6ce3518559f
diff --git a/Source/bindings/v8/ExceptionState.h b/Source/bindings/v8/ExceptionState.h
index 98a77a3..c0bbd48 100644
--- a/Source/bindings/v8/ExceptionState.h
+++ b/Source/bindings/v8/ExceptionState.h
@@ -34,6 +34,7 @@
 #include "bindings/v8/ScopedPersistent.h"
 #include "bindings/v8/V8ThrowException.h"
 #include "wtf/Noncopyable.h"
+#include "wtf/text/WTFString.h"
 #include <v8.h>
 
 namespace WebCore {
@@ -47,8 +48,8 @@
         : m_code(0)
         , m_isolate(isolate) { }
 
-    virtual void throwDOMException(const ExceptionCode&,  const char* message = 0);
-    virtual void throwTypeError(const char* message = 0);
+    virtual void throwDOMException(const ExceptionCode&,  const String& message = String());
+    virtual void throwTypeError(const String& message = String());
 
     bool hadException() const { return !m_exception.isEmpty() || m_code; }
     void clearException();
@@ -61,7 +62,7 @@
             throwDOMException(m_code);
         }
 
-        V8ThrowException::throwError(m_exception.deprecatedGet());
+        V8ThrowException::throwError(m_exception.newLocal(m_isolate));
         return true;
     }
 
@@ -93,8 +94,8 @@
 class NonThrowExceptionState : public ExceptionState {
 public:
     NonThrowExceptionState();
-    virtual void throwDOMException(const ExceptionCode&, const char* = 0) OVERRIDE FINAL;
-    virtual void throwTypeError(const char* = 0) OVERRIDE FINAL;
+    virtual void throwDOMException(const ExceptionCode&, const String& message = String()) OVERRIDE FINAL;
+    virtual void throwTypeError(const String& message = String()) OVERRIDE FINAL;
 };
 
 } // namespace WebCore