OLD | NEW |
---|---|
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 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
850 for (unsigned i = 0; i < numSources; ++i) { | 850 for (unsigned i = 0; i < numSources; ++i) { |
851 TextPosition position(OrdinalNumber::fromOneBasedInt(sourcesIn[i].startL ine), OrdinalNumber::first()); | 851 TextPosition position(OrdinalNumber::fromOneBasedInt(sourcesIn[i].startL ine), OrdinalNumber::first()); |
852 sources.append(ScriptSourceCode(sourcesIn[i].code, sourcesIn[i].url, pos ition)); | 852 sources.append(ScriptSourceCode(sourcesIn[i].code, sourcesIn[i].url, pos ition)); |
853 } | 853 } |
854 | 854 |
855 if (results) { | 855 if (results) { |
856 Vector<ScriptValue> scriptResults; | 856 Vector<ScriptValue> scriptResults; |
857 frame()->script()->executeScriptInIsolatedWorld(worldID, sources, extens ionGroup, &scriptResults); | 857 frame()->script()->executeScriptInIsolatedWorld(worldID, sources, extens ionGroup, &scriptResults); |
858 WebVector<v8::Local<v8::Value> > v8Results(scriptResults.size()); | 858 WebVector<v8::Local<v8::Value> > v8Results(scriptResults.size()); |
859 for (unsigned i = 0; i < scriptResults.size(); i++) | 859 for (unsigned i = 0; i < scriptResults.size(); i++) |
860 v8Results[i] = v8::Local<v8::Value>::New(scriptResults[i].v8Value()) ; | 860 v8Results[i] = v8::Local<v8::Value>::New(frame()->script()->currentW orldContext()->GetIsolate(), scriptResults[i].v8Value()); |
marja
2013/09/12 07:41:21
Oops, we should also have getIsolateFromFrame, at
do-not-use
2013/09/12 12:07:32
isolateForFrame() does:
frame->script()->isolate()
| |
861 results->swap(v8Results); | 861 results->swap(v8Results); |
862 } else | 862 } else |
863 frame()->script()->executeScriptInIsolatedWorld(worldID, sources, extens ionGroup, 0); | 863 frame()->script()->executeScriptInIsolatedWorld(worldID, sources, extens ionGroup, 0); |
864 } | 864 } |
865 | 865 |
866 v8::Handle<v8::Value> WebFrameImpl::callFunctionEvenIfScriptDisabled(v8::Handle< v8::Function> function, v8::Handle<v8::Object> receiver, int argc, v8::Handle<v8 ::Value> argv[]) | 866 v8::Handle<v8::Value> WebFrameImpl::callFunctionEvenIfScriptDisabled(v8::Handle< v8::Function> function, v8::Handle<v8::Object> receiver, int argc, v8::Handle<v8 ::Value> argv[]) |
867 { | 867 { |
868 ASSERT(frame()); | 868 ASSERT(frame()); |
869 return frame()->script()->callFunctionEvenIfScriptDisabled(function, receive r, argc, argv).v8Value(); | 869 return frame()->script()->callFunctionEvenIfScriptDisabled(function, receive r, argc, argv).v8Value(); |
870 } | 870 } |
(...skipping 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2476 | 2476 |
2477 // There is a possibility that the frame being detached was the only | 2477 // There is a possibility that the frame being detached was the only |
2478 // pending one. We need to make sure final replies can be sent. | 2478 // pending one. We need to make sure final replies can be sent. |
2479 flushCurrentScopingEffort(m_findRequestIdentifier); | 2479 flushCurrentScopingEffort(m_findRequestIdentifier); |
2480 | 2480 |
2481 cancelPendingScopingEffort(); | 2481 cancelPendingScopingEffort(); |
2482 } | 2482 } |
2483 } | 2483 } |
2484 | 2484 |
2485 } // namespace WebKit | 2485 } // namespace WebKit |
OLD | NEW |