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

Side by Side Diff: Source/bindings/tests/results/V8TestObject.cpp

Issue 24118003: Pass isolate to v8::Undefined() function (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 This file is part of the Blink open source project. 2 This file is part of the Blink open source project.
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 static void withScriptStateAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 1053 static void withScriptStateAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
1054 { 1054 {
1055 TestObj* imp = V8TestObject::toNative(info.Holder()); 1055 TestObj* imp = V8TestObject::toNative(info.Holder());
1056 V8TRYCATCH_VOID(int, v, toInt32(value)); 1056 V8TRYCATCH_VOID(int, v, toInt32(value));
1057 ScriptState* currentState = ScriptState::current(); 1057 ScriptState* currentState = ScriptState::current();
1058 if (!currentState) 1058 if (!currentState)
1059 return; 1059 return;
1060 ScriptState& state = *currentState; 1060 ScriptState& state = *currentState;
1061 imp->setWithScriptStateAttribute(&state, v); 1061 imp->setWithScriptStateAttribute(&state, v);
1062 if (state.hadException()) 1062 if (state.hadException())
1063 throwError(state.exception()); 1063 throwError(state.exception(), info.GetIsolate());
1064 return; 1064 return;
1065 } 1065 }
1066 1066
1067 static void withScriptStateAttributeAttributeSetterCallback(v8::Local<v8::String > name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 1067 static void withScriptStateAttributeAttributeSetterCallback(v8::Local<v8::String > name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
1068 { 1068 {
1069 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1069 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1070 TestObjV8Internal::withScriptStateAttributeAttributeSetter(name, value, info ); 1070 TestObjV8Internal::withScriptStateAttributeAttributeSetter(name, value, info );
1071 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1071 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1072 } 1072 }
1073 1073
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 TestObj* imp = V8TestObject::toNative(info.Holder()); 1136 TestObj* imp = V8TestObject::toNative(info.Holder());
1137 ExceptionState es(info.GetIsolate()); 1137 ExceptionState es(info.GetIsolate());
1138 ScriptState* currentState = ScriptState::current(); 1138 ScriptState* currentState = ScriptState::current();
1139 if (!currentState) 1139 if (!currentState)
1140 return v8Undefined(); 1140 return v8Undefined();
1141 ScriptState& state = *currentState; 1141 ScriptState& state = *currentState;
1142 RefPtr<TestObj> v = imp->withScriptStateAttributeRaises(&state, es); 1142 RefPtr<TestObj> v = imp->withScriptStateAttributeRaises(&state, es);
1143 if (UNLIKELY(es.throwIfNeeded())) 1143 if (UNLIKELY(es.throwIfNeeded()))
1144 return; 1144 return;
1145 if (state.hadException()) { 1145 if (state.hadException()) {
1146 throwError(state.exception()); 1146 throwError(state.exception(), info.GetIsolate());
1147 return; 1147 return;
1148 } 1148 }
1149 v8SetReturnValueFast(info, v.release(), imp); 1149 v8SetReturnValueFast(info, v.release(), imp);
1150 return; 1150 return;
1151 } 1151 }
1152 1152
1153 static void withScriptStateAttributeRaisesAttributeGetterCallback(v8::Local<v8:: String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 1153 static void withScriptStateAttributeRaisesAttributeGetterCallback(v8::Local<v8:: String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
1154 { 1154 {
1155 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1155 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1156 TestObjV8Internal::withScriptStateAttributeRaisesAttributeGetter(name, info) ; 1156 TestObjV8Internal::withScriptStateAttributeRaisesAttributeGetter(name, info) ;
1157 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1157 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1158 } 1158 }
1159 1159
1160 static void withScriptStateAttributeRaisesAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 1160 static void withScriptStateAttributeRaisesAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
1161 { 1161 {
1162 TestObj* imp = V8TestObject::toNative(info.Holder()); 1162 TestObj* imp = V8TestObject::toNative(info.Holder());
1163 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec t>::Cast(value)) : 0); 1163 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec t>::Cast(value)) : 0);
1164 ScriptState* currentState = ScriptState::current(); 1164 ScriptState* currentState = ScriptState::current();
1165 if (!currentState) 1165 if (!currentState)
1166 return; 1166 return;
1167 ScriptState& state = *currentState; 1167 ScriptState& state = *currentState;
1168 imp->setWithScriptStateAttributeRaises(&state, WTF::getPtr(v)); 1168 imp->setWithScriptStateAttributeRaises(&state, WTF::getPtr(v));
1169 if (state.hadException()) 1169 if (state.hadException())
1170 throwError(state.exception()); 1170 throwError(state.exception(), info.GetIsolate());
1171 return; 1171 return;
1172 } 1172 }
1173 1173
1174 static void withScriptStateAttributeRaisesAttributeSetterCallback(v8::Local<v8:: String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 1174 static void withScriptStateAttributeRaisesAttributeSetterCallback(v8::Local<v8:: String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
1175 { 1175 {
1176 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1176 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1177 TestObjV8Internal::withScriptStateAttributeRaisesAttributeSetter(name, value , info); 1177 TestObjV8Internal::withScriptStateAttributeRaisesAttributeSetter(name, value , info);
1178 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1178 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1179 } 1179 }
1180 1180
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 { 1236 {
1237 TestObj* imp = V8TestObject::toNative(info.Holder()); 1237 TestObj* imp = V8TestObject::toNative(info.Holder());
1238 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec t>::Cast(value)) : 0); 1238 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec t>::Cast(value)) : 0);
1239 ScriptState* currentState = ScriptState::current(); 1239 ScriptState* currentState = ScriptState::current();
1240 if (!currentState) 1240 if (!currentState)
1241 return; 1241 return;
1242 ScriptState& state = *currentState; 1242 ScriptState& state = *currentState;
1243 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); 1243 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
1244 imp->setWithScriptExecutionContextAndScriptStateAttribute(&state, scriptCont ext, WTF::getPtr(v)); 1244 imp->setWithScriptExecutionContextAndScriptStateAttribute(&state, scriptCont ext, WTF::getPtr(v));
1245 if (state.hadException()) 1245 if (state.hadException())
1246 throwError(state.exception()); 1246 throwError(state.exception(), info.GetIsolate());
1247 return; 1247 return;
1248 } 1248 }
1249 1249
1250 static void withScriptExecutionContextAndScriptStateAttributeAttributeSetterCall back(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyC allbackInfo<void>& info) 1250 static void withScriptExecutionContextAndScriptStateAttributeAttributeSetterCall back(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyC allbackInfo<void>& info)
1251 { 1251 {
1252 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1252 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1253 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttribut eSetter(name, value, info); 1253 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttribut eSetter(name, value, info);
1254 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1254 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1255 } 1255 }
1256 1256
1257 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttributeGett er(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 1257 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttributeGett er(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
1258 { 1258 {
1259 TestObj* imp = V8TestObject::toNative(info.Holder()); 1259 TestObj* imp = V8TestObject::toNative(info.Holder());
1260 ExceptionState es(info.GetIsolate()); 1260 ExceptionState es(info.GetIsolate());
1261 ScriptState* currentState = ScriptState::current(); 1261 ScriptState* currentState = ScriptState::current();
1262 if (!currentState) 1262 if (!currentState)
1263 return v8Undefined(); 1263 return v8Undefined();
1264 ScriptState& state = *currentState; 1264 ScriptState& state = *currentState;
1265 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); 1265 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
1266 RefPtr<TestObj> v = imp->withScriptExecutionContextAndScriptStateAttributeRa ises(&state, scriptContext, es); 1266 RefPtr<TestObj> v = imp->withScriptExecutionContextAndScriptStateAttributeRa ises(&state, scriptContext, es);
1267 if (UNLIKELY(es.throwIfNeeded())) 1267 if (UNLIKELY(es.throwIfNeeded()))
1268 return; 1268 return;
1269 if (state.hadException()) { 1269 if (state.hadException()) {
1270 throwError(state.exception()); 1270 throwError(state.exception(), info.GetIsolate());
1271 return; 1271 return;
1272 } 1272 }
1273 v8SetReturnValueFast(info, v.release(), imp); 1273 v8SetReturnValueFast(info, v.release(), imp);
1274 return; 1274 return;
1275 } 1275 }
1276 1276
1277 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttributeGett erCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value> & info) 1277 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttributeGett erCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value> & info)
1278 { 1278 {
1279 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1279 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1280 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAt tributeGetter(name, info); 1280 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAt tributeGetter(name, info);
1281 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1281 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1282 } 1282 }
1283 1283
1284 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttributeSett er(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCal lbackInfo<void>& info) 1284 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttributeSett er(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCal lbackInfo<void>& info)
1285 { 1285 {
1286 TestObj* imp = V8TestObject::toNative(info.Holder()); 1286 TestObj* imp = V8TestObject::toNative(info.Holder());
1287 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec t>::Cast(value)) : 0); 1287 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec t>::Cast(value)) : 0);
1288 ScriptState* currentState = ScriptState::current(); 1288 ScriptState* currentState = ScriptState::current();
1289 if (!currentState) 1289 if (!currentState)
1290 return; 1290 return;
1291 ScriptState& state = *currentState; 1291 ScriptState& state = *currentState;
1292 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); 1292 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
1293 imp->setWithScriptExecutionContextAndScriptStateAttributeRaises(&state, scri ptContext, WTF::getPtr(v)); 1293 imp->setWithScriptExecutionContextAndScriptStateAttributeRaises(&state, scri ptContext, WTF::getPtr(v));
1294 if (state.hadException()) 1294 if (state.hadException())
1295 throwError(state.exception()); 1295 throwError(state.exception(), info.GetIsolate());
1296 return; 1296 return;
1297 } 1297 }
1298 1298
1299 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttributeSett erCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::Pro pertyCallbackInfo<void>& info) 1299 static void withScriptExecutionContextAndScriptStateAttributeRaisesAttributeSett erCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::Pro pertyCallbackInfo<void>& info)
1300 { 1300 {
1301 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1301 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1302 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAt tributeSetter(name, value, info); 1302 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAt tributeSetter(name, value, info);
1303 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1303 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1304 } 1304 }
1305 1305
(...skipping 20 matching lines...) Expand all
1326 { 1326 {
1327 TestObj* imp = V8TestObject::toNative(info.Holder()); 1327 TestObj* imp = V8TestObject::toNative(info.Holder());
1328 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec t>::Cast(value)) : 0); 1328 V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Objec t>::Cast(value)) : 0);
1329 ScriptState* currentState = ScriptState::current(); 1329 ScriptState* currentState = ScriptState::current();
1330 if (!currentState) 1330 if (!currentState)
1331 return; 1331 return;
1332 ScriptState& state = *currentState; 1332 ScriptState& state = *currentState;
1333 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); 1333 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
1334 imp->setWithScriptExecutionContextAndScriptStateWithSpacesAttribute(&state, scriptContext, WTF::getPtr(v)); 1334 imp->setWithScriptExecutionContextAndScriptStateWithSpacesAttribute(&state, scriptContext, WTF::getPtr(v));
1335 if (state.hadException()) 1335 if (state.hadException())
1336 throwError(state.exception()); 1336 throwError(state.exception(), info.GetIsolate());
1337 return; 1337 return;
1338 } 1338 }
1339 1339
1340 static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttribute SetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8: :PropertyCallbackInfo<void>& info) 1340 static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttribute SetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8: :PropertyCallbackInfo<void>& info)
1341 { 1341 {
1342 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1342 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1343 TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttribu teAttributeSetter(name, value, info); 1343 TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttribu teAttributeSetter(name, value, info);
1344 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1344 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1345 } 1345 }
1346 1346
(...skipping 1941 matching lines...) Expand 10 before | Expand all | Expand 10 after
3288 { 3288 {
3289 TestObj* imp = V8TestObject::toNative(args.Holder()); 3289 TestObj* imp = V8TestObject::toNative(args.Holder());
3290 ScriptState* currentState = ScriptState::current(); 3290 ScriptState* currentState = ScriptState::current();
3291 if (!currentState) 3291 if (!currentState)
3292 return; 3292 return;
3293 ScriptState& state = *currentState; 3293 ScriptState& state = *currentState;
3294 imp->withScriptStateVoid(&state); 3294 imp->withScriptStateVoid(&state);
3295 if (state.hadException()) { 3295 if (state.hadException()) {
3296 v8::Local<v8::Value> exception = state.exception(); 3296 v8::Local<v8::Value> exception = state.exception();
3297 state.clearException(); 3297 state.clearException();
3298 throwError(exception); 3298 throwError(exception, args.GetIsolate());
3299 return; 3299 return;
3300 } 3300 }
3301 3301
3302 return; 3302 return;
3303 } 3303 }
3304 3304
3305 static void withScriptStateVoidMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& args) 3305 static void withScriptStateVoidMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& args)
3306 { 3306 {
3307 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3307 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3308 TestObjV8Internal::withScriptStateVoidMethod(args); 3308 TestObjV8Internal::withScriptStateVoidMethod(args);
3309 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3309 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3310 } 3310 }
3311 3311
3312 static void withScriptStateObjMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 3312 static void withScriptStateObjMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
3313 { 3313 {
3314 TestObj* imp = V8TestObject::toNative(args.Holder()); 3314 TestObj* imp = V8TestObject::toNative(args.Holder());
3315 ScriptState* currentState = ScriptState::current(); 3315 ScriptState* currentState = ScriptState::current();
3316 if (!currentState) 3316 if (!currentState)
3317 return; 3317 return;
3318 ScriptState& state = *currentState; 3318 ScriptState& state = *currentState;
3319 RefPtr<TestObj> result = imp->withScriptStateObj(&state); 3319 RefPtr<TestObj> result = imp->withScriptStateObj(&state);
3320 if (state.hadException()) { 3320 if (state.hadException()) {
3321 v8::Local<v8::Value> exception = state.exception(); 3321 v8::Local<v8::Value> exception = state.exception();
3322 state.clearException(); 3322 state.clearException();
3323 throwError(exception); 3323 throwError(exception, args.GetIsolate());
3324 return; 3324 return;
3325 } 3325 }
3326 v8SetReturnValue(args, result.release(), args.Holder()); 3326 v8SetReturnValue(args, result.release(), args.Holder());
3327 return; 3327 return;
3328 } 3328 }
3329 3329
3330 static void withScriptStateObjMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& args) 3330 static void withScriptStateObjMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& args)
3331 { 3331 {
3332 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3332 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3333 TestObjV8Internal::withScriptStateObjMethod(args); 3333 TestObjV8Internal::withScriptStateObjMethod(args);
3334 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3334 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3335 } 3335 }
3336 3336
3337 static void withScriptStateVoidExceptionMethod(const v8::FunctionCallbackInfo<v8 ::Value>& args) 3337 static void withScriptStateVoidExceptionMethod(const v8::FunctionCallbackInfo<v8 ::Value>& args)
3338 { 3338 {
3339 TestObj* imp = V8TestObject::toNative(args.Holder()); 3339 TestObj* imp = V8TestObject::toNative(args.Holder());
3340 ExceptionState es(args.GetIsolate()); 3340 ExceptionState es(args.GetIsolate());
3341 ScriptState* currentState = ScriptState::current(); 3341 ScriptState* currentState = ScriptState::current();
3342 if (!currentState) 3342 if (!currentState)
3343 return; 3343 return;
3344 ScriptState& state = *currentState; 3344 ScriptState& state = *currentState;
3345 imp->withScriptStateVoidException(&state, es); 3345 imp->withScriptStateVoidException(&state, es);
3346 if (es.throwIfNeeded()) 3346 if (es.throwIfNeeded())
3347 return; 3347 return;
3348 if (state.hadException()) { 3348 if (state.hadException()) {
3349 v8::Local<v8::Value> exception = state.exception(); 3349 v8::Local<v8::Value> exception = state.exception();
3350 state.clearException(); 3350 state.clearException();
3351 throwError(exception); 3351 throwError(exception, args.GetIsolate());
3352 return; 3352 return;
3353 } 3353 }
3354 3354
3355 return; 3355 return;
3356 } 3356 }
3357 3357
3358 static void withScriptStateVoidExceptionMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& args) 3358 static void withScriptStateVoidExceptionMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& args)
3359 { 3359 {
3360 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3360 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3361 TestObjV8Internal::withScriptStateVoidExceptionMethod(args); 3361 TestObjV8Internal::withScriptStateVoidExceptionMethod(args);
3362 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3362 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3363 } 3363 }
3364 3364
3365 static void withScriptStateObjExceptionMethod(const v8::FunctionCallbackInfo<v8: :Value>& args) 3365 static void withScriptStateObjExceptionMethod(const v8::FunctionCallbackInfo<v8: :Value>& args)
3366 { 3366 {
3367 TestObj* imp = V8TestObject::toNative(args.Holder()); 3367 TestObj* imp = V8TestObject::toNative(args.Holder());
3368 ExceptionState es(args.GetIsolate()); 3368 ExceptionState es(args.GetIsolate());
3369 ScriptState* currentState = ScriptState::current(); 3369 ScriptState* currentState = ScriptState::current();
3370 if (!currentState) 3370 if (!currentState)
3371 return; 3371 return;
3372 ScriptState& state = *currentState; 3372 ScriptState& state = *currentState;
3373 RefPtr<TestObj> result = imp->withScriptStateObjException(&state, es); 3373 RefPtr<TestObj> result = imp->withScriptStateObjException(&state, es);
3374 if (es.throwIfNeeded()) 3374 if (es.throwIfNeeded())
3375 return; 3375 return;
3376 if (state.hadException()) { 3376 if (state.hadException()) {
3377 v8::Local<v8::Value> exception = state.exception(); 3377 v8::Local<v8::Value> exception = state.exception();
3378 state.clearException(); 3378 state.clearException();
3379 throwError(exception); 3379 throwError(exception, args.GetIsolate());
3380 return; 3380 return;
3381 } 3381 }
3382 v8SetReturnValue(args, result.release(), args.Holder()); 3382 v8SetReturnValue(args, result.release(), args.Holder());
3383 return; 3383 return;
3384 } 3384 }
3385 3385
3386 static void withScriptStateObjExceptionMethodCallback(const v8::FunctionCallback Info<v8::Value>& args) 3386 static void withScriptStateObjExceptionMethodCallback(const v8::FunctionCallback Info<v8::Value>& args)
3387 { 3387 {
3388 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3388 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3389 TestObjV8Internal::withScriptStateObjExceptionMethod(args); 3389 TestObjV8Internal::withScriptStateObjExceptionMethod(args);
(...skipping 21 matching lines...) Expand all
3411 TestObj* imp = V8TestObject::toNative(args.Holder()); 3411 TestObj* imp = V8TestObject::toNative(args.Holder());
3412 ScriptState* currentState = ScriptState::current(); 3412 ScriptState* currentState = ScriptState::current();
3413 if (!currentState) 3413 if (!currentState)
3414 return; 3414 return;
3415 ScriptState& state = *currentState; 3415 ScriptState& state = *currentState;
3416 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); 3416 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
3417 imp->withScriptExecutionContextAndScriptState(&state, scriptContext); 3417 imp->withScriptExecutionContextAndScriptState(&state, scriptContext);
3418 if (state.hadException()) { 3418 if (state.hadException()) {
3419 v8::Local<v8::Value> exception = state.exception(); 3419 v8::Local<v8::Value> exception = state.exception();
3420 state.clearException(); 3420 state.clearException();
3421 throwError(exception); 3421 throwError(exception, args.GetIsolate());
3422 return; 3422 return;
3423 } 3423 }
3424 3424
3425 return; 3425 return;
3426 } 3426 }
3427 3427
3428 static void withScriptExecutionContextAndScriptStateMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& args) 3428 static void withScriptExecutionContextAndScriptStateMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& args)
3429 { 3429 {
3430 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3430 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3431 TestObjV8Internal::withScriptExecutionContextAndScriptStateMethod(args); 3431 TestObjV8Internal::withScriptExecutionContextAndScriptStateMethod(args);
3432 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3432 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3433 } 3433 }
3434 3434
3435 static void withScriptExecutionContextAndScriptStateObjExceptionMethod(const v8: :FunctionCallbackInfo<v8::Value>& args) 3435 static void withScriptExecutionContextAndScriptStateObjExceptionMethod(const v8: :FunctionCallbackInfo<v8::Value>& args)
3436 { 3436 {
3437 TestObj* imp = V8TestObject::toNative(args.Holder()); 3437 TestObj* imp = V8TestObject::toNative(args.Holder());
3438 ExceptionState es(args.GetIsolate()); 3438 ExceptionState es(args.GetIsolate());
3439 ScriptState* currentState = ScriptState::current(); 3439 ScriptState* currentState = ScriptState::current();
3440 if (!currentState) 3440 if (!currentState)
3441 return; 3441 return;
3442 ScriptState& state = *currentState; 3442 ScriptState& state = *currentState;
3443 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); 3443 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
3444 RefPtr<TestObj> result = imp->withScriptExecutionContextAndScriptStateObjExc eption(&state, scriptContext, es); 3444 RefPtr<TestObj> result = imp->withScriptExecutionContextAndScriptStateObjExc eption(&state, scriptContext, es);
3445 if (es.throwIfNeeded()) 3445 if (es.throwIfNeeded())
3446 return; 3446 return;
3447 if (state.hadException()) { 3447 if (state.hadException()) {
3448 v8::Local<v8::Value> exception = state.exception(); 3448 v8::Local<v8::Value> exception = state.exception();
3449 state.clearException(); 3449 state.clearException();
3450 throwError(exception); 3450 throwError(exception, args.GetIsolate());
3451 return; 3451 return;
3452 } 3452 }
3453 v8SetReturnValue(args, result.release(), args.Holder()); 3453 v8SetReturnValue(args, result.release(), args.Holder());
3454 return; 3454 return;
3455 } 3455 }
3456 3456
3457 static void withScriptExecutionContextAndScriptStateObjExceptionMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& args) 3457 static void withScriptExecutionContextAndScriptStateObjExceptionMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& args)
3458 { 3458 {
3459 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3459 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3460 TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionMetho d(args); 3460 TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionMetho d(args);
3461 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3461 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3462 } 3462 }
3463 3463
3464 static void withScriptExecutionContextAndScriptStateWithSpacesMethod(const v8::F unctionCallbackInfo<v8::Value>& args) 3464 static void withScriptExecutionContextAndScriptStateWithSpacesMethod(const v8::F unctionCallbackInfo<v8::Value>& args)
3465 { 3465 {
3466 TestObj* imp = V8TestObject::toNative(args.Holder()); 3466 TestObj* imp = V8TestObject::toNative(args.Holder());
3467 ScriptState* currentState = ScriptState::current(); 3467 ScriptState* currentState = ScriptState::current();
3468 if (!currentState) 3468 if (!currentState)
3469 return; 3469 return;
3470 ScriptState& state = *currentState; 3470 ScriptState& state = *currentState;
3471 ScriptExecutionContext* scriptContext = getScriptExecutionContext(); 3471 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
3472 RefPtr<TestObj> result = imp->withScriptExecutionContextAndScriptStateWithSp aces(&state, scriptContext); 3472 RefPtr<TestObj> result = imp->withScriptExecutionContextAndScriptStateWithSp aces(&state, scriptContext);
3473 if (state.hadException()) { 3473 if (state.hadException()) {
3474 v8::Local<v8::Value> exception = state.exception(); 3474 v8::Local<v8::Value> exception = state.exception();
3475 state.clearException(); 3475 state.clearException();
3476 throwError(exception); 3476 throwError(exception, args.GetIsolate());
3477 return; 3477 return;
3478 } 3478 }
3479 v8SetReturnValue(args, result.release(), args.Holder()); 3479 v8SetReturnValue(args, result.release(), args.Holder());
3480 return; 3480 return;
3481 } 3481 }
3482 3482
3483 static void withScriptExecutionContextAndScriptStateWithSpacesMethodCallback(con st v8::FunctionCallbackInfo<v8::Value>& args) 3483 static void withScriptExecutionContextAndScriptStateWithSpacesMethodCallback(con st v8::FunctionCallbackInfo<v8::Value>& args)
3484 { 3484 {
3485 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3485 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3486 TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesMethod( args); 3486 TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesMethod( args);
(...skipping 2068 matching lines...) Expand 10 before | Expand all | Expand 10 after
5555 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper, isolate, WrapperConfiguration::Independent); 5555 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper, isolate, WrapperConfiguration::Independent);
5556 return wrapper; 5556 return wrapper;
5557 } 5557 }
5558 5558
5559 void V8TestObject::derefObject(void* object) 5559 void V8TestObject::derefObject(void* object)
5560 { 5560 {
5561 fromInternalPointer(object)->deref(); 5561 fromInternalPointer(object)->deref();
5562 } 5562 }
5563 5563
5564 } // namespace WebCore 5564 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698