Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: include/AdblockPlus/JsValue.h

Issue 29449592: Issue 5183 - Provide async interface for FileSystem (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Left Patch Set: Rebased on https://codereview.adblockplus.org/29481704 Created July 6, 2017, 10:40 p.m.
Right Patch Set: Rebase on master. Last changes. Created July 7, 2017, 1:36 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « include/AdblockPlus/JsEngine.h ('k') | libadblockplus.gyp » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 void SetProperty(const std::string& name, const JsValue& value); 103 void SetProperty(const std::string& name, const JsValue& value);
104 inline void SetProperty(const std::string& name, const char* val) 104 inline void SetProperty(const std::string& name, const char* val)
105 { 105 {
106 SetProperty(name, std::string(val)); 106 SetProperty(name, std::string(val));
107 } 107 }
108 inline void SetProperty(const std::string& name, int val) 108 inline void SetProperty(const std::string& name, int val)
109 { 109 {
110 SetProperty(name, static_cast<int64_t>(val)); 110 SetProperty(name, static_cast<int64_t>(val));
111 } 111 }
112 //@} 112 //@}
113 /**
114 * Sets a property value string if this is an object (see `IsObject()`).
115 * @param name Property name.
116 * @param val Property value as a StringBuffer.
117 */
118 void SetStringBufferProperty(const std::string& name, const StringBuffer& va l);
113 119
114 /** 120 /**
115 * Returns the value's class name, e.g.\ _Array_ for arrays 121 * Returns the value's class name, e.g.\ _Array_ for arrays
116 * (see `IsArray()`). 122 * (see `IsArray()`).
117 * Technically, this is the name of the function that was used as a 123 * Technically, this is the name of the function that was used as a
118 * constructor. 124 * constructor.
119 * @return Class name of the value. 125 * @return Class name of the value.
120 */ 126 */
121 std::string GetClass() const; 127 std::string GetClass() const;
122 128
(...skipping 30 matching lines...) Expand all
153 159
154 // Parameter args is not const because a pointer to its internal arrays is 160 // Parameter args is not const because a pointer to its internal arrays is
155 // passed to v8::Function::Call but the latter does not expect a const point er. 161 // passed to v8::Function::Call but the latter does not expect a const point er.
156 JsValue Call(std::vector<v8::Local<v8::Value>>& args, v8::Local<v8::Object> thisObj) const; 162 JsValue Call(std::vector<v8::Local<v8::Value>>& args, v8::Local<v8::Object> thisObj) const;
157 163
158 std::unique_ptr<v8::Global<v8::Value>> value; 164 std::unique_ptr<v8::Global<v8::Value>> value;
159 }; 165 };
160 } 166 }
161 167
162 #endif 168 #endif
LEFTRIGHT

Powered by Google App Engine
This is Rietveld