summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/profiler/ProfilerOriginStack.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/profiler/ProfilerOriginStack.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/JavaScriptCore/profiler/ProfilerOriginStack.cpp')
-rw-r--r--Source/JavaScriptCore/profiler/ProfilerOriginStack.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/JavaScriptCore/profiler/ProfilerOriginStack.cpp b/Source/JavaScriptCore/profiler/ProfilerOriginStack.cpp
index 018ceeb8c..61dfb63c6 100644
--- a/Source/JavaScriptCore/profiler/ProfilerOriginStack.cpp
+++ b/Source/JavaScriptCore/profiler/ProfilerOriginStack.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2012, 2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -27,8 +27,9 @@
#include "ProfilerOriginStack.h"
#include "CodeOrigin.h"
+#include "InlineCallFrame.h"
#include "JSGlobalObject.h"
-#include "Operations.h"
+#include "JSCInlines.h"
#include "ProfilerDatabase.h"
namespace JSC { namespace Profiler {
@@ -51,7 +52,7 @@ OriginStack::OriginStack(Database& database, CodeBlock* codeBlock, const CodeOri
for (unsigned i = 1; i < stack.size(); ++i) {
append(Origin(
- database.ensureBytecodesFor(stack[i].inlineCallFrame->baselineCodeBlock()),
+ database.ensureBytecodesFor(stack[i].inlineCallFrame->baselineCodeBlock.get()),
stack[i].bytecodeIndex));
}
}
@@ -99,10 +100,15 @@ void OriginStack::dump(PrintStream& out) const
JSValue OriginStack::toJS(ExecState* exec) const
{
+ VM& vm = exec->vm();
+ auto scope = DECLARE_THROW_SCOPE(vm);
JSArray* result = constructEmptyArray(exec, 0);
+ RETURN_IF_EXCEPTION(scope, { });
- for (unsigned i = 0; i < m_stack.size(); ++i)
+ for (unsigned i = 0; i < m_stack.size(); ++i) {
result->putDirectIndex(exec, i, m_stack[i].toJS(exec));
+ RETURN_IF_EXCEPTION(scope, { });
+ }
return result;
}