Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Unified Diff: include/v8.h

Issue 15688003: build fix for 14738 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 72737aab37e2cc2fb8a8e8aca5d2730b1f06bdb8..b3dff3fee107a6e3992e925b488d8ba760723e50 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -2750,6 +2750,8 @@ class V8EXPORT ReturnValue {
V8_INLINE(void SetNull(Isolate* isolate));
V8_INLINE(void SetUndefined(Isolate* isolate));
private:
+ V8_INLINE(void SetTrue(Isolate* isolate));
+ V8_INLINE(void SetFalse(Isolate* isolate));
internal::Object** value_;
};
@@ -5680,9 +5682,23 @@ void ReturnValue<T>::Set(Isolate* isolate, uint32_t i) {
template<typename T>
void ReturnValue<T>::Set(Isolate* isolate, bool value) {
+ if (value) {
+ SetTrue(isolate);
+ } else {
+ SetFalse(isolate);
+ }
+}
+
+template<typename T>
+void ReturnValue<T>::SetTrue(Isolate* isolate) {
+ typedef internal::Internals I;
+ *value_ = *I::GetRoot(isolate, I::kTrueValueRootIndex);
+}
+
+template<typename T>
+void ReturnValue<T>::SetFalse(Isolate* isolate) {
typedef internal::Internals I;
- *value_ = *I::GetRoot(
- isolate, value ? I::kTrueValueRootIndex : I::kFalseValueRootIndex);
+ *value_ = *I::GetRoot(isolate, I::kFalseValueRootIndex);
}
template<typename T>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698