diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-09-12 07:49:03 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-09-12 07:49:03 +0200 |
commit | a9ac6da893ac10ce160c9eb80141508881cd71e2 (patch) | |
tree | 0e74067407612d44ad07ff74cb7be6d444ee28c5 /src/v8/0011-QtScript-V8-Add-new-v8-api-to-check-if-a-value-is-an.patch | |
parent | 8eb5ba3b9cb1e8e07f28a3153672a946b2d82fd9 (diff) | |
parent | 687461627310e8b781da15d1a907c35bd8ffea6e (diff) |
Merge branch 'master' into refactor
Conflicts:
src/3rdparty/v8
src/gui/text/qfont_qpa.cpp
src/gui/widgets/qlinecontrol.cpp
src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.cpp
tests/auto/gui.pro
tests/auto/network.pro
tests/auto/qstring/tst_qstring.cpp
Change-Id: Id118c172645303ccf06a207050d5bf1462ff57fe
Diffstat (limited to 'src/v8/0011-QtScript-V8-Add-new-v8-api-to-check-if-a-value-is-an.patch')
-rw-r--r-- | src/v8/0011-QtScript-V8-Add-new-v8-api-to-check-if-a-value-is-an.patch | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/v8/0011-QtScript-V8-Add-new-v8-api-to-check-if-a-value-is-an.patch b/src/v8/0011-QtScript-V8-Add-new-v8-api-to-check-if-a-value-is-an.patch index aefcae55cd..fdec7a1baa 100644 --- a/src/v8/0011-QtScript-V8-Add-new-v8-api-to-check-if-a-value-is-an.patch +++ b/src/v8/0011-QtScript-V8-Add-new-v8-api-to-check-if-a-value-is-an.patch @@ -1,7 +1,7 @@ -From f22d0312faeb93ced8747d9aae8c6d77e11b4aba Mon Sep 17 00:00:00 2001 +From 5f3e5dd6901b54707ea4f868d8fa7317c4ab3852 Mon Sep 17 00:00:00 2001 From: Jedrzej Nowacki <jedrzej.nowacki@nokia.com> Date: Tue, 7 Dec 2010 11:56:42 +0100 -Subject: [PATCH 11/16] QtScript/V8: Add new v8 api to check if a value is an +Subject: [PATCH 11/15] QtScript/V8: Add new v8 api to check if a value is an error. New function v8::Value::IsError was created. @@ -15,13 +15,13 @@ research. 3 files changed, 12 insertions(+), 0 deletions(-) diff --git a/include/v8.h b/include/v8.h -index 84462b5..08b0ec2 100644 +index 18527e1..43e00f5 100644 --- a/include/v8.h +++ b/include/v8.h @@ -937,6 +937,11 @@ class Value : public Data { */ V8EXPORT bool IsRegExp() const; - + + /** + * Returns true if this value is an Error. + */ @@ -37,14 +37,14 @@ index 1a585d6..bd435eb 100644 @@ -2108,6 +2108,12 @@ bool Value::IsRegExp() const { return obj->IsJSRegExp(); } - + +bool Value::IsError() const { + if (IsDeadCheck(i::Isolate::Current(), "v8::Value::IsError()")) return false; + i::Handle<i::Object> obj = Utils::OpenHandle(this); + return obj->HasSpecificClassOf(HEAP->Error_symbol()); +} + - + Local<String> Value::ToString() const { i::Handle<i::Object> obj = Utils::OpenHandle(this); diff --git a/src/heap.h b/src/heap.h @@ -59,6 +59,6 @@ index 8cbf378..db90bb9 100644 V(this_symbol, "this") \ V(to_string_symbol, "toString") \ V(char_at_symbol, "CharAt") \ --- -1.7.6 +-- +1.7.4.4 |