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

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

Issue 1085453003: IDL: Add support for [Unscopeable] on attributes and methods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fixes Created 5 years, 8 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
« no previous file with comments | « Source/bindings/IDLExtendedAttributes.txt ('k') | Source/bindings/core/v8/WrapperTypeInfo.h » ('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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 if (prototypeTemplate.IsEmpty()) 107 if (prototypeTemplate.IsEmpty())
108 return v8::Local<v8::Function>(); 108 return v8::Local<v8::Function>();
109 if (!v8CallBoolean(function->SetPrototype(currentContext, prototypeTempl ate))) 109 if (!v8CallBoolean(function->SetPrototype(currentContext, prototypeTempl ate)))
110 return v8::Local<v8::Function>(); 110 return v8::Local<v8::Function>();
111 } 111 }
112 112
113 v8::Local<v8::Object> prototypeObject = function->Get(currentContext, v8Atom icString(m_isolate, "prototype")).ToLocalChecked().As<v8::Object>(); 113 v8::Local<v8::Object> prototypeObject = function->Get(currentContext, v8Atom icString(m_isolate, "prototype")).ToLocalChecked().As<v8::Object>();
114 if (prototypeObject->InternalFieldCount() == v8PrototypeInternalFieldcount 114 if (prototypeObject->InternalFieldCount() == v8PrototypeInternalFieldcount
115 && type->wrapperTypePrototype == WrapperTypeInfo::WrapperTypeObjectProto type) 115 && type->wrapperTypePrototype == WrapperTypeInfo::WrapperTypeObjectProto type)
116 prototypeObject->SetAlignedPointerInInternalField(v8PrototypeTypeIndex, const_cast<WrapperTypeInfo*>(type)); 116 prototypeObject->SetAlignedPointerInInternalField(v8PrototypeTypeIndex, const_cast<WrapperTypeInfo*>(type));
117 type->installConditionallyEnabledMethods(prototypeObject, m_isolate); 117 type->preparePrototypeObject(m_isolate, prototypeObject);
118 if (type->wrapperTypePrototype == WrapperTypeInfo::WrapperTypeExceptionProto type) { 118 if (type->wrapperTypePrototype == WrapperTypeInfo::WrapperTypeExceptionProto type) {
119 if (!v8CallBoolean(prototypeObject->SetPrototype(currentContext, m_error Prototype.newLocal(m_isolate)))) 119 if (!v8CallBoolean(prototypeObject->SetPrototype(currentContext, m_error Prototype.newLocal(m_isolate))))
120 return v8::Local<v8::Function>(); 120 return v8::Local<v8::Function>();
121 } 121 }
122 122
123 m_constructorMap.Set(type, function); 123 m_constructorMap.Set(type, function);
124 124
125 return function; 125 return function;
126 } 126 }
127 127
(...skipping 17 matching lines...) Expand all
145 { 145 {
146 return m_compiledPrivateScript.Get(className); 146 return m_compiledPrivateScript.Get(className);
147 } 147 }
148 148
149 void V8PerContextData::setCompiledPrivateScript(String className, v8::Handle<v8: :Value> compiledObject) 149 void V8PerContextData::setCompiledPrivateScript(String className, v8::Handle<v8: :Value> compiledObject)
150 { 150 {
151 m_compiledPrivateScript.Set(className, compiledObject); 151 m_compiledPrivateScript.Set(className, compiledObject);
152 } 152 }
153 153
154 } // namespace blink 154 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/IDLExtendedAttributes.txt ('k') | Source/bindings/core/v8/WrapperTypeInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698