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

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

Issue 149803005: Remove isolated world parameters from event listener attributes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after
1451 static void staticLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1451 static void staticLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1452 { 1452 {
1453 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1453 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1454 TestObjectPythonV8Internal::staticLongAttributeAttributeSetter(jsValue, info ); 1454 TestObjectPythonV8Internal::staticLongAttributeAttributeSetter(jsValue, info );
1455 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1455 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1456 } 1456 }
1457 1457
1458 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info) 1458 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
1459 { 1459 {
1460 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 1460 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1461 EventListener* jsValue = imp->eventHandlerAttribute(isolatedWorldForIsolate( info.GetIsolate())); 1461 EventListener* jsValue = imp->eventHandlerAttribute();
1462 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen er::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8:: Value>(v8::Null(info.GetIsolate()))); 1462 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen er::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8:: Value>(v8::Null(info.GetIsolate())));
1463 } 1463 }
1464 1464
1465 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1465 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1466 { 1466 {
1467 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1467 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1468 TestObjectPythonV8Internal::eventHandlerAttributeAttributeGetter(info); 1468 TestObjectPythonV8Internal::eventHandlerAttributeAttributeGetter(info);
1469 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1469 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1470 } 1470 }
1471 1471
1472 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info) 1472 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info)
1473 { 1473 {
1474 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 1474 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1475 moveEventListenerToNewWrapper(info.Holder(), imp->eventHandlerAttribute(isol atedWorldForIsolate(info.GetIsolate())), jsValue, V8TestObjectPython::eventListe nerCacheIndex, info.GetIsolate()); 1475 moveEventListenerToNewWrapper(info.Holder(), imp->eventHandlerAttribute(), j sValue, V8TestObjectPython::eventListenerCacheIndex, info.GetIsolate());
1476 imp->setEventHandlerAttribute(V8EventListenerList::getEventListener(jsValue, true, ListenerFindOrCreate), isolatedWorldForIsolate(info.GetIsolate())); 1476 imp->setEventHandlerAttribute(V8EventListenerList::getEventListener(jsValue, true, ListenerFindOrCreate));
1477 } 1477 }
1478 1478
1479 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1479 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1480 { 1480 {
1481 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1481 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1482 TestObjectPythonV8Internal::eventHandlerAttributeAttributeSetter(jsValue, in fo); 1482 TestObjectPythonV8Internal::eventHandlerAttributeAttributeSetter(jsValue, in fo);
1483 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1483 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1484 } 1484 }
1485 1485
1486 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) 1486 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
(...skipping 6193 matching lines...) Expand 10 before | Expand all | Expand 10 after
7680 fromInternalPointer(object)->deref(); 7680 fromInternalPointer(object)->deref();
7681 } 7681 }
7682 7682
7683 template<> 7683 template<>
7684 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object > creationContext, v8::Isolate* isolate) 7684 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object > creationContext, v8::Isolate* isolate)
7685 { 7685 {
7686 return toV8(impl, creationContext, isolate); 7686 return toV8(impl, creationContext, isolate);
7687 } 7687 }
7688 7688
7689 } // namespace WebCore 7689 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.cpp ('k') | Source/bindings/v8/V8AbstractEventListener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698