OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2008, 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 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 if (m_extensions[i].extension == extension) | 834 if (m_extensions[i].extension == extension) |
835 return true; | 835 return true; |
836 } | 836 } |
837 | 837 |
838 return false; | 838 return false; |
839 } | 839 } |
840 | 840 |
841 void V8Proxy::registerExtension(v8::Extension* extension, const String& schemeRe
striction) | 841 void V8Proxy::registerExtension(v8::Extension* extension, const String& schemeRe
striction) |
842 { | 842 { |
843 registerExtensionWithV8(extension); | 843 registerExtensionWithV8(extension); |
844 V8ExtensionInfo info = {schemeRestriction, 0, extension}; | 844 V8ExtensionInfo info = {schemeRestriction, 0, extension, false}; |
845 m_extensions.append(info); | 845 m_extensions.append(info); |
846 } | 846 } |
847 | 847 |
848 void V8Proxy::registerExtension(v8::Extension* extension, int extensionGroup) | 848 void V8Proxy::registerExtension(v8::Extension* extension, int extensionGroup) |
849 { | 849 { |
850 registerExtensionWithV8(extension); | 850 registerExtensionWithV8(extension); |
851 V8ExtensionInfo info = {String(), extensionGroup, extension}; | 851 V8ExtensionInfo info = {String(), extensionGroup, extension, false}; |
| 852 m_extensions.append(info); |
| 853 } |
| 854 |
| 855 void V8Proxy::registerExtension(v8::Extension* extension) |
| 856 { |
| 857 registerExtensionWithV8(extension); |
| 858 V8ExtensionInfo info = {String(), 0, extension, true}; |
852 m_extensions.append(info); | 859 m_extensions.append(info); |
853 } | 860 } |
854 | 861 |
855 bool V8Proxy::setContextDebugId(int debugId) | 862 bool V8Proxy::setContextDebugId(int debugId) |
856 { | 863 { |
857 ASSERT(debugId > 0); | 864 ASSERT(debugId > 0); |
858 v8::HandleScope scope; | 865 v8::HandleScope scope; |
859 v8::Handle<v8::Context> context = windowShell()->context(); | 866 v8::Handle<v8::Context> context = windowShell()->context(); |
860 if (context.IsEmpty()) | 867 if (context.IsEmpty()) |
861 return false; | 868 return false; |
(...skipping 29 matching lines...) Expand all Loading... |
891 #if ENABLE(WORKERS) | 898 #if ENABLE(WORKERS) |
892 } else if (context->isWorkerContext()) { | 899 } else if (context->isWorkerContext()) { |
893 if (WorkerContextExecutionProxy* proxy = static_cast<WorkerContext*>(con
text)->script()->proxy()) | 900 if (WorkerContextExecutionProxy* proxy = static_cast<WorkerContext*>(con
text)->script()->proxy()) |
894 return proxy->context(); | 901 return proxy->context(); |
895 #endif | 902 #endif |
896 } | 903 } |
897 return v8::Local<v8::Context>(); | 904 return v8::Local<v8::Context>(); |
898 } | 905 } |
899 | 906 |
900 } // namespace WebCore | 907 } // namespace WebCore |
OLD | NEW |