| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Ericsson AB. All rights reserved. | 3 * Copyright (C) 2012 Ericsson AB. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 inline void v8SetReturnValueStringOrNull(const CallbackInfo& info, const String&
string, v8::Isolate* isolate) | 177 inline void v8SetReturnValueStringOrNull(const CallbackInfo& info, const String&
string, v8::Isolate* isolate) |
| 178 { | 178 { |
| 179 if (string.isNull()) { | 179 if (string.isNull()) { |
| 180 v8SetReturnValueNull(info); | 180 v8SetReturnValueNull(info); |
| 181 return; | 181 return; |
| 182 } | 182 } |
| 183 V8PerIsolateData::from(isolate)->stringCache()->setReturnValueFromString(inf
o.GetReturnValue(), string.impl()); | 183 V8PerIsolateData::from(isolate)->stringCache()->setReturnValueFromString(inf
o.GetReturnValue(), string.impl()); |
| 184 } | 184 } |
| 185 | 185 |
| 186 template<typename CallbackInfo> | 186 template<typename CallbackInfo> |
| 187 inline void v8SetReturnValueStringOrUndefined(const CallbackInfo& info, const St
ring& string, v8::Isolate* isolate) | |
| 188 { | |
| 189 if (string.isNull()) { | |
| 190 v8SetReturnValueUndefined(info); | |
| 191 return; | |
| 192 } | |
| 193 V8PerIsolateData::from(isolate)->stringCache()->setReturnValueFromString(inf
o.GetReturnValue(), string.impl()); | |
| 194 } | |
| 195 | |
| 196 template<typename CallbackInfo> | |
| 197 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, ScriptWrappable*
impl, v8::Local<v8::Object> creationContext) | 187 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, ScriptWrappable*
impl, v8::Local<v8::Object> creationContext) |
| 198 { | 188 { |
| 199 if (UNLIKELY(!impl)) { | 189 if (UNLIKELY(!impl)) { |
| 200 v8SetReturnValueNull(callbackInfo); | 190 v8SetReturnValueNull(callbackInfo); |
| 201 return; | 191 return; |
| 202 } | 192 } |
| 203 if (DOMDataStore::setReturnValue(callbackInfo.GetReturnValue(), impl)) | 193 if (DOMDataStore::setReturnValue(callbackInfo.GetReturnValue(), impl)) |
| 204 return; | 194 return; |
| 205 v8::Local<v8::Object> wrapper = impl->wrap(callbackInfo.GetIsolate(), creati
onContext); | 195 v8::Local<v8::Object> wrapper = impl->wrap(callbackInfo.GetIsolate(), creati
onContext); |
| 206 v8SetReturnValue(callbackInfo, wrapper); | 196 v8SetReturnValue(callbackInfo, wrapper); |
| (...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 PassRefPtr<TracedValue> devToolsTraceEventData(v8::Isolate*, ExecutionContext*,
v8::Local<v8::Function>); | 1073 PassRefPtr<TracedValue> devToolsTraceEventData(v8::Isolate*, ExecutionContext*,
v8::Local<v8::Function>); |
| 1084 | 1074 |
| 1085 // Callback functions used by generated code. | 1075 // Callback functions used by generated code. |
| 1086 CORE_EXPORT void v8ConstructorAttributeGetter(v8::Local<v8::Name> propertyName,
const v8::PropertyCallbackInfo<v8::Value>&); | 1076 CORE_EXPORT void v8ConstructorAttributeGetter(v8::Local<v8::Name> propertyName,
const v8::PropertyCallbackInfo<v8::Value>&); |
| 1087 | 1077 |
| 1088 typedef void (*InstallTemplateFunction)(v8::Local<v8::FunctionTemplate>, v8::Iso
late*); | 1078 typedef void (*InstallTemplateFunction)(v8::Local<v8::FunctionTemplate>, v8::Iso
late*); |
| 1089 | 1079 |
| 1090 } // namespace blink | 1080 } // namespace blink |
| 1091 | 1081 |
| 1092 #endif // V8Binding_h | 1082 #endif // V8Binding_h |
| OLD | NEW |