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

Side by Side Diff: Source/bindings/core/v8/V8Binding.h

Issue 978233002: bindings,devtools: Shows DOM attributes' values in DevTools. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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) 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 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 void ensureInitialized() const; 988 void ensureInitialized() const;
989 989
990 mutable int m_scriptId; 990 mutable int m_scriptId;
991 mutable int m_lineNumber; 991 mutable int m_lineNumber;
992 mutable String m_resourceName; 992 mutable String m_resourceName;
993 mutable v8::Handle<v8::Function> m_function; 993 mutable v8::Handle<v8::Function> m_function;
994 }; 994 };
995 995
996 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(v8::Isol ate*, ExecutionContext*, v8::Handle<v8::Function>); 996 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(v8::Isol ate*, ExecutionContext*, v8::Handle<v8::Function>);
997 997
998 class AttributesWithObservableSideEffectOnGet final {
999 public:
1000 // Returns true iff |domObject| is a DOM object and whose attribute named
1001 // |attributeName| has no observable side effect when "get" is called.
1002 static bool hasNoSideEffect(v8::Isolate*, v8::Handle<v8::Value> domObject, v 8::Handle<v8::Value> attributeName);
1003
1004 // Registers a DOM attribute which has side effect when "get" is called.
1005 static void add(const WrapperTypeInfo*, String attributeName);
1006
1007 private:
1008 typedef Vector<std::pair<const WrapperTypeInfo*, String>> AttributeSet;
1009
1010 static AttributeSet* attributesWithSideEffectOnGet();
1011 };
1012
998 class V8RethrowTryCatchScope final { 1013 class V8RethrowTryCatchScope final {
999 public: 1014 public:
1000 explicit V8RethrowTryCatchScope(v8::TryCatch& block) : m_block(block) { } 1015 explicit V8RethrowTryCatchScope(v8::TryCatch& block) : m_block(block) { }
1001 ~V8RethrowTryCatchScope() 1016 ~V8RethrowTryCatchScope()
1002 { 1017 {
1003 // ReThrow() is a no-op if no exception has been caught, so always call. 1018 // ReThrow() is a no-op if no exception has been caught, so always call.
1004 m_block.ReThrow(); 1019 m_block.ReThrow();
1005 } 1020 }
1006 1021
1007 private: 1022 private:
1008 v8::TryCatch& m_block; 1023 v8::TryCatch& m_block;
1009 }; 1024 };
1010 1025
1011 // Callback functions used by generated code. 1026 // Callback functions used by generated code.
1012 void v8ConstructorAttributeGetterAsProperty(v8::Local<v8::String> propertyName, const v8::PropertyCallbackInfo<v8::Value>&); 1027 void v8ConstructorAttributeGetterAsProperty(v8::Local<v8::String> propertyName, const v8::PropertyCallbackInfo<v8::Value>&);
1013 void v8ConstructorAttributeGetterAsAccessor(const v8::FunctionCallbackInfo<v8::V alue>&); 1028 void v8ConstructorAttributeGetterAsAccessor(const v8::FunctionCallbackInfo<v8::V alue>&);
1014 1029
1015 typedef void (*InstallTemplateFunction)(v8::Local<v8::FunctionTemplate>, v8::Iso late*); 1030 typedef void (*InstallTemplateFunction)(v8::Local<v8::FunctionTemplate>, v8::Iso late*);
1016 1031
1017 } // namespace blink 1032 } // namespace blink
1018 1033
1019 #endif // V8Binding_h 1034 #endif // V8Binding_h
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/v8/V8Binding.cpp » ('j') | Source/core/inspector/InjectedScriptSource.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698