Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 178 : m_v8Object(object) | 178 : m_v8Object(object) |
| 179 , m_mode(Externalize) | 179 , m_mode(Externalize) |
| 180 { | 180 { |
| 181 } | 181 } |
| 182 | 182 |
| 183 void operator=(v8::Handle<v8::Value> object) | 183 void operator=(v8::Handle<v8::Value> object) |
| 184 { | 184 { |
| 185 m_v8Object = object; | 185 m_v8Object = object; |
| 186 } | 186 } |
| 187 | 187 |
| 188 void operator=(String string) | |
|
Nils Barth (inactive)
2014/06/04 05:22:25
...and this also in followup?
| |
| 189 { | |
| 190 setString(string); | |
| 191 } | |
| 192 | |
| 188 bool prepare() | 193 bool prepare() |
| 189 { | 194 { |
| 190 if (m_v8Object.IsEmpty()) | 195 if (m_v8Object.IsEmpty()) |
| 191 return true; | 196 return true; |
| 192 | 197 |
| 193 if (!isValid()) { | 198 if (!isValid()) { |
| 194 setString(String()); | 199 setString(String()); |
| 195 return true; | 200 return true; |
| 196 } | 201 } |
| 197 | 202 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 250 } | 255 } |
| 251 | 256 |
| 252 template<> inline bool V8StringResource<WithUndefinedOrNullCheck>::isValid() con st | 257 template<> inline bool V8StringResource<WithUndefinedOrNullCheck>::isValid() con st |
| 253 { | 258 { |
| 254 return !m_v8Object->IsNull() && !m_v8Object->IsUndefined(); | 259 return !m_v8Object->IsNull() && !m_v8Object->IsUndefined(); |
| 255 } | 260 } |
| 256 | 261 |
| 257 } // namespace WebCore | 262 } // namespace WebCore |
| 258 | 263 |
| 259 #endif // V8StringResource_h | 264 #endif // V8StringResource_h |
| OLD | NEW |