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

Side by Side Diff: Source/bindings/core/v8/V8DOMWrapper.cpp

Issue 978233002: bindings,devtools: Shows DOM attributes' values in DevTools. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed review comments. 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
« no previous file with comments | « no previous file | Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 { 86 {
87 if (value.IsEmpty() || !value->IsObject()) 87 if (value.IsEmpty() || !value->IsObject())
88 return false; 88 return false;
89 v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(value); 89 v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(value);
90 90
91 if (object->InternalFieldCount() < v8DefaultWrapperInternalFieldCount) 91 if (object->InternalFieldCount() < v8DefaultWrapperInternalFieldCount)
92 return false; 92 return false;
93 93
94 const WrapperTypeInfo* untrustedWrapperTypeInfo = toWrapperTypeInfo(object); 94 const WrapperTypeInfo* untrustedWrapperTypeInfo = toWrapperTypeInfo(object);
95 V8PerIsolateData* perIsolateData = V8PerIsolateData::from(isolate); 95 V8PerIsolateData* perIsolateData = V8PerIsolateData::from(isolate);
96 if (!(untrustedWrapperTypeInfo && perIsolateData))
97 return false;
96 return perIsolateData->hasInstance(untrustedWrapperTypeInfo, object); 98 return perIsolateData->hasInstance(untrustedWrapperTypeInfo, object);
97 } 99 }
98 100
99 bool V8DOMWrapper::hasInternalFieldsSet(v8::Local<v8::Value> value) 101 bool V8DOMWrapper::hasInternalFieldsSet(v8::Local<v8::Value> value)
100 { 102 {
101 if (value.IsEmpty() || !value->IsObject()) 103 if (value.IsEmpty() || !value->IsObject())
102 return false; 104 return false;
103 v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(value); 105 v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(value);
104 106
105 if (object->InternalFieldCount() < v8DefaultWrapperInternalFieldCount) 107 if (object->InternalFieldCount() < v8DefaultWrapperInternalFieldCount)
106 return false; 108 return false;
107 109
108 const ScriptWrappable* untrustedScriptWrappable = toScriptWrappable(object); 110 const ScriptWrappable* untrustedScriptWrappable = toScriptWrappable(object);
109 const WrapperTypeInfo* untrustedWrapperTypeInfo = toWrapperTypeInfo(object); 111 const WrapperTypeInfo* untrustedWrapperTypeInfo = toWrapperTypeInfo(object);
110 return untrustedScriptWrappable 112 return untrustedScriptWrappable
111 && untrustedWrapperTypeInfo 113 && untrustedWrapperTypeInfo
112 && untrustedWrapperTypeInfo->ginEmbedder == gin::kEmbedderBlink; 114 && untrustedWrapperTypeInfo->ginEmbedder == gin::kEmbedderBlink;
113 } 115 }
114 116
115 } // namespace blink 117 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698