Index: Source/bindings/v8/ScriptPromise.h |
diff --git a/Source/bindings/v8/ScriptString.h b/Source/bindings/v8/ScriptPromise.h |
similarity index 72% |
copy from Source/bindings/v8/ScriptString.h |
copy to Source/bindings/v8/ScriptPromise.h |
index 14467c7eb9feb0e4c7780ef86d013820b5f2174f..203c1f53aba6749af2d64f879a40bcd41678a913 100644 |
--- a/Source/bindings/v8/ScriptString.h |
+++ b/Source/bindings/v8/ScriptPromise.h |
@@ -28,24 +28,42 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef ScriptString_h |
-#define ScriptString_h |
+#ifndef ScriptPromise_h |
+#define ScriptPromise_h |
+#include "bindings/v8/ScopedPersistent.h" |
#include "bindings/v8/ScriptValue.h" |
-#include "bindings/v8/V8Binding.h" |
-#include "wtf/text/WTFString.h" |
+#include "bindings/v8/V8ScriptRunner.h" |
+#include <v8.h> |
namespace WebCore { |
-class ScriptString : public ScriptValue { |
+class ScriptPromise : public ScriptValue { |
public: |
- ScriptString() { } |
- explicit ScriptString(v8::Handle<v8::String> value) : ScriptValue(value) { } |
+ ScriptPromise() |
+ : ScriptValue() |
+ { |
+ } |
- ScriptString concatenateWith(const String&); |
- String flattenToString() const; |
+ explicit ScriptPromise(ScriptValue promise) |
+ : ScriptValue(promise) |
+ { |
+ ASSERT(!hasNoValue()); |
+ } |
+ |
+ explicit ScriptPromise(v8::Handle<v8::Value> promise) |
+ : ScriptValue(promise) |
+ { |
+ ASSERT(!hasNoValue()); |
+ } |
+ |
+ bool isUndefinedOrNull() const |
+ { |
+ return isUndefined() || isNull(); |
+ } |
}; |
} // namespace WebCore |
-#endif // ScriptString_h |
+ |
+#endif // ScriptPromise_h |