Changeset 103488 in webkit
- Timestamp:
- Dec 21, 2011 8:39:15 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r103482 r103488 1 2011-12-21 Konrad Piascik <kpiascik@rim.com> 2 3 Implement the JavaScriptCore bindings for eventListenerHandlerLocation 4 https://bugs.webkit.org/show_bug.cgi?id=74313 5 6 Reviewed by Eric Seidel. 7 8 Updated project files to get Windows and Mac builds working. 9 10 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: 11 * JavaScriptCore.xcodeproj/project.pbxproj: 12 1 13 2011-12-21 Filip Pizlo <fpizlo@apple.com> 2 14 -
trunk/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
r103083 r103488 299 299 ?retrieveLastCaller@Interpreter@JSC@@QBEXPAVExecState@2@AAH1AAVUString@2@AAVJSValue@2@@Z 300 300 ?s_globalObjectMethodTable@JSGlobalObject@JSC@@1UGlobalObjectMethodTable@2@B 301 ?s_info@ExecutableBase@JSC@@2UClassInfo@2@B 301 302 ?setAccessorDescriptor@PropertyDescriptor@JSC@@QAEXVJSValue@2@0I@Z 302 303 ?setConfigurable@PropertyDescriptor@JSC@@QAEX_N@Z -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r102917 r103488 142 142 1429D8780ED21ACD00B89619 /* ExceptionHelpers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1429D8770ED21ACD00B89619 /* ExceptionHelpers.cpp */; }; 143 143 1429D8850ED21C3D00B89619 /* SamplingTool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1429D8830ED21C3D00B89619 /* SamplingTool.cpp */; }; 144 1429D8860ED21C3D00B89619 /* SamplingTool.h in Headers */ = {isa = PBXBuildFile; fileRef = 1429D8840ED21C3D00B89619 /* SamplingTool.h */; };144 1429D8860ED21C3D00B89619 /* SamplingTool.h in Headers */ = {isa = PBXBuildFile; fileRef = 1429D8840ED21C3D00B89619 /* SamplingTool.h */; settings = {ATTRIBUTES = (Private, ); }; }; 145 145 1429D8DD0ED2205B00B89619 /* CallFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1429D8DB0ED2205B00B89619 /* CallFrame.cpp */; }; 146 146 1429D8DE0ED2205B00B89619 /* CallFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 1429D8DC0ED2205B00B89619 /* CallFrame.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 363 363 86C568E211A213EE0007F7F0 /* MIPSAssembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 86C568DF11A213EE0007F7F0 /* MIPSAssembler.h */; }; 364 364 86CA032E1038E8440028A609 /* Executable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86CA032D1038E8440028A609 /* Executable.cpp */; }; 365 86CAFEE31035DDE60028A609 /* Executable.h in Headers */ = {isa = PBXBuildFile; fileRef = 86CAFEE21035DDE60028A609 /* Executable.h */; settings = {ATTRIBUTES = ( ); }; };365 86CAFEE31035DDE60028A609 /* Executable.h in Headers */ = {isa = PBXBuildFile; fileRef = 86CAFEE21035DDE60028A609 /* Executable.h */; settings = {ATTRIBUTES = (Private, ); }; }; 366 366 86CC85A10EE79A4700288682 /* JITInlineMethods.h in Headers */ = {isa = PBXBuildFile; fileRef = 86CC85A00EE79A4700288682 /* JITInlineMethods.h */; }; 367 367 86CC85A30EE79B7400288682 /* JITCall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86CC85A20EE79B7400288682 /* JITCall.cpp */; }; … … 403 403 90D3469C0E285280009492EE /* RefCountedLeakCounter.h in Headers */ = {isa = PBXBuildFile; fileRef = 90D3469B0E285280009492EE /* RefCountedLeakCounter.h */; settings = {ATTRIBUTES = (Private, ); }; }; 404 404 93052C340FB792190048FDC3 /* ParserArena.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93052C320FB792190048FDC3 /* ParserArena.cpp */; }; 405 93052C350FB792190048FDC3 /* ParserArena.h in Headers */ = {isa = PBXBuildFile; fileRef = 93052C330FB792190048FDC3 /* ParserArena.h */; settings = {ATTRIBUTES = ( ); }; };405 93052C350FB792190048FDC3 /* ParserArena.h in Headers */ = {isa = PBXBuildFile; fileRef = 93052C330FB792190048FDC3 /* ParserArena.h */; settings = {ATTRIBUTES = (Private, ); }; }; 406 406 932F5BD30822A1C700736975 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6560A4CF04B3B3E7008AE952 /* CoreFoundation.framework */; }; 407 407 932F5BD60822A1C700736975 /* libobjc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 51F0EC0705C86C9A00E6DF1B /* libobjc.dylib */; }; … … 429 429 969A072A0ED1CE6900F1F681 /* Label.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07270ED1CE6900F1F681 /* Label.h */; }; 430 430 969A072B0ED1CE6900F1F681 /* RegisterID.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07280ED1CE6900F1F681 /* RegisterID.h */; }; 431 969A072C0ED1CE6900F1F681 /* SegmentedVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07290ED1CE6900F1F681 /* SegmentedVector.h */; };431 969A072C0ED1CE6900F1F681 /* SegmentedVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07290ED1CE6900F1F681 /* SegmentedVector.h */; settings = {ATTRIBUTES = (Private, ); }; }; 432 432 969A07960ED1D3AE00F1F681 /* CodeBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 969A07900ED1D3AE00F1F681 /* CodeBlock.cpp */; settings = {COMPILER_FLAGS = "-fno-strict-aliasing"; }; }; 433 433 969A07970ED1D3AE00F1F681 /* CodeBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07910ED1D3AE00F1F681 /* CodeBlock.h */; settings = {ATTRIBUTES = (); }; }; … … 588 588 BC18C43C0E16F5CD00B34460 /* MathObject.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A86B0255597D01FF60F7 /* MathObject.h */; settings = {ATTRIBUTES = (Private, ); }; }; 589 589 BC18C43E0E16F5CD00B34460 /* MessageQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = E1EE798B0D6CA53D00FEA3BA /* MessageQueue.h */; settings = {ATTRIBUTES = (Private, ); }; }; 590 BC18C43F0E16F5CD00B34460 /* Nodes.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A86E0255597D01FF60F7 /* Nodes.h */; settings = {ATTRIBUTES = ( ); }; };590 BC18C43F0E16F5CD00B34460 /* Nodes.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A86E0255597D01FF60F7 /* Nodes.h */; settings = {ATTRIBUTES = (Private, ); }; }; 591 591 BC18C4400E16F5CD00B34460 /* Noncopyable.h in Headers */ = {isa = PBXBuildFile; fileRef = 9303F5690991190000AD71B8 /* Noncopyable.h */; settings = {ATTRIBUTES = (Private, ); }; }; 592 592 BC18C4410E16F5CD00B34460 /* NumberConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = BC2680C30E16D4E900A06E92 /* NumberConstructor.h */; }; … … 2585 2585 86D3B2C410156BDE002865E7 /* ARMAssembler.h in Headers */, 2586 2586 86ADD1450FDDEA980006EEC2 /* ARMv7Assembler.h in Headers */, 2587 1429D8860ED21C3D00B89619 /* SamplingTool.h in Headers */, 2588 969A072C0ED1CE6900F1F681 /* SegmentedVector.h in Headers */, 2589 93052C350FB792190048FDC3 /* ParserArena.h in Headers */, 2590 BC18C43F0E16F5CD00B34460 /* Nodes.h in Headers */, 2591 86CAFEE31035DDE60028A609 /* Executable.h in Headers */, 2587 2592 145722861437E140005FDE26 /* StrongInlines.h in Headers */, 2588 2593 0FD82F4B142806A100179C94 /* BitVector.h in Headers */, … … 2674 2679 969A07980ED1D3AE00F1F681 /* EvalCodeCache.h in Headers */, 2675 2680 BC18C4000E16F5CD00B34460 /* ExceptionHelpers.h in Headers */, 2676 86CAFEE31035DDE60028A609 /* Executable.h in Headers */,2677 2681 A766B44F0EE8DCD1009518CA /* ExecutableAllocator.h in Headers */, 2678 2682 A7FEE67614837B32005DC1A6 /* ExportMacros.h in Headers */, … … 2782 2786 BC02E9130E1839DB000F9297 /* NativeErrorPrototype.h in Headers */, 2783 2787 7EFF00640EC05A9A00AA7C93 /* NodeInfo.h in Headers */, 2784 BC18C43F0E16F5CD00B34460 /* Nodes.h in Headers */,2785 2788 BC18C4400E16F5CD00B34460 /* Noncopyable.h in Headers */, 2786 2789 65E1A3DF122B894500B26097 /* NonCopyingSort.h in Headers */, … … 2808 2811 8690231512092D5C00630AF9 /* PageReservation.h in Headers */, 2809 2812 BC18C44B0E16F5CD00B34460 /* Parser.h in Headers */, 2810 93052C350FB792190048FDC3 /* ParserArena.h in Headers */,2811 2813 BCFBE696122560E800309E9D /* PassOwnArrayPtr.h in Headers */, 2812 2814 44DD48530FAEA85000D6B4EB /* PassOwnPtr.h in Headers */, … … 2856 2858 869EBCB70E8C6D4A008722CC /* ResultType.h in Headers */, 2857 2859 BC18C4600E16F5CD00B34460 /* RetainPtr.h in Headers */, 2858 1429D8860ED21C3D00B89619 /* SamplingTool.h in Headers */,2859 2860 BC18C4610E16F5CD00B34460 /* ScopeChain.h in Headers */, 2860 969A072C0ED1CE6900F1F681 /* SegmentedVector.h in Headers */,2861 2861 A7C40C0B130B057D00D002A1 /* SentinelLinkedList.h in Headers */, 2862 2862 76FB9F0F12E851860051A2EB /* SHA1.h in Headers */, -
trunk/Source/WebCore/ChangeLog
r103487 r103488 1 2011-12-21 Konrad Piascik <kpiascik@rim.com> 2 3 Implement the JavaScriptCore bindings for eventListenerHandlerLocation 4 https://bugs.webkit.org/show_bug.cgi?id=74313 5 6 Reviewed by Eric Seidel. 7 8 Implemented the JavaScriptCore binding to allow Web Inspector to 9 show the function name and line number for an event listener in 10 the Elements panel. 11 12 Tested by opening up a page which has a registered event listener in Safari 13 and checking if the Elements panel script name and line number are present 14 and clickable. 15 16 * ForwardingHeaders/runtime/Executable.h: Added. 17 * ForwardingHeaders/wtf/SegmentedVector.h: Added. 18 * bindings/js/ScriptEventListener.cpp: 19 (WebCore::eventListenerHandlerLocation): 20 1 21 2011-12-21 Chris Guan <chris.guan@torchmobile.com.cn> 2 22 -
trunk/Source/WebCore/bindings/js/ScriptEventListener.cpp
r102657 r103488 1 1 /* 2 2 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 37 38 #include "JSNode.h" 38 39 #include "Frame.h" 40 #include <runtime/Executable.h> 41 #include <runtime/JSFunction.h> 39 42 #include <runtime/JSLock.h> 40 43 … … 104 107 } 105 108 106 bool eventListenerHandlerLocation(Document* , EventListener*, String&, int&)109 bool eventListenerHandlerLocation(Document* document, EventListener* eventListener, String& sourceName, int& lineNumber) 107 110 { 108 // FIXME: Add support for getting function location. 109 return false; 111 const JSEventListener* jsListener = JSEventListener::cast(eventListener); 112 if (!jsListener) 113 return false; 114 JSC::JSObject* jsObject = jsListener->jsFunction(document); 115 if (!jsObject) 116 return false; 117 JSC::JSFunction* jsFunction = static_cast<JSFunction*>(jsObject); 118 if (!jsFunction || jsFunction->isHostFunction()) 119 return false; 120 JSC::FunctionExecutable* funcExecutable = jsFunction->jsExecutable(); 121 if (!funcExecutable) 122 return false; 123 lineNumber = funcExecutable->lineNo(); 124 sourceName = ustringToString(funcExecutable->sourceURL()); 125 return true; 110 126 } 111 127
Note: See TracChangeset
for help on using the changeset viewer.